You can use the Social Plugins wherever you want, but if they are created dynamically (which may be the case in the modal popup) you have to parse the code again, after the HTML code is created:
https://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/