If its an allergy, its normally a protein that is the allergen. otherwise its a food sensitivity/intolerance.
I think its a bit odd that your Dr has said your son is allergic to a product rather than a specific ingredient or food.

How did it happen - i.e. were you at home and you have him son, rash appeared, you went to the doctors and it was diagnosed?

Or had you had allergy testing done, and that was one of the results?

Vegemite ingredients are: Yeast extract, salt, mineral salt, (508, 509) malt extract, natural colour, (150) vegetable extract, thiamine(E), riboflavin, niacin.

Have you noticed any other foods at all that your son has had even a remote reaction to? Have you given him vegemite before, or was it the first time?

Id be thinking its a reaction to yeast, malt or the colour thats in it.

I think Id ask for a referral to an allergy specialist to work out what specifically he is reacting to, that way you can eliminate other foods as well that may cause the same reaction.