You have a few options to accomplish this:
1) Use stacking groups for the Twitter/Facebook line.
You can force the Twitter/Facebook icon to disappear if the twitter handle is left blank. You can see an instructional video of this here: http://support.aleyant.com/kb/a252/stacking-groups.aspx
2) Use a custom font that contains the Twitter/Facebook image.
You can create a custom font that contains images. You could create the font with the Twitter or Facebook icon as a letter. Upload the custom font to eDoc. Then use field scripting to change the font just for the symbol section. Type in the letter that corresponds to the Twitter or Facebook image in your custom font. If you Google custom icon fonts, you will see a lot of websites that will create these for you.