Can a metal allergy test be used in determining what type of earrings or jewelry one can wear?

Yes. You can get a patch test by an allergist that can determine if you're allergic to different things. The most common is a nickel allergy. It can easily be diagnosed by just your history and skin reaction to the offending agent.