You cannot target raid icons using macros or the wow api. However Jamba has the next best thing, Jamba-Target (it uses mob names).

Jamba-Target lets you mark mobs with raid icons, then you press keys assigned each raid icon and all your slaves target that mob.

Documentation for Jamba-Target is here .

Information on Jamba can be found here .

Ask me (I wrote Jamba) any questions you have if you decide to use it...