Is there any explicit rule in Indian vedas that states Onions should not be used for cooking in temples. I recently had a debate (Personally found it silly) and the research ended in Ayurvedic categorization of food. Now if vedas prohibts the usage of Onions, which are the other Tamasic vegitables in this category? Is this followed by all the temples?
There is no mention of any prohibition of herbs like onion/garlic in Ayurveda. Infact Charaka Samhita (Sutrasthana Chapter 27) encourages the use of these herbs.
श्लेष्मलोमारुतघ्नश्चपलाण्डुर्नचपित्तनुत् । आहारयोगीबल्यश्चगुरुर्वृष्योऽथरोचनः॥१७५॥
SleShmalo mArutaGnaSca palANDurna ca pittanut | AhArayogI balyaSca gururvRuShyo&tha rocanaH||175||
The onion/palandu (Allium cepa Linn) promotes kapha and is effective in treating vata but not of pitta. It is a good adjuvant for food and is a strength-enhancer, heavy, aphrodisiac and appetizing. 
krimikuShThakilAsaGno vAtaGno gulmanASanaH| snigdhaScoShNaSca vRuShyaSca laSunaH kaTuko guruH||176||
The garlic/lashuna (Allium sativum Linn.) is effective in treating worms, dermatosis including leprosy, vata disorders and gulma. It is unctuous, hot, aphrodisiac, pungent and heavy. 
शुष्काणिकफवातघ्नान्येतान्येषांफलानिच। हरितानामयंचैषषष्ठोवर्गःसमाप्यते॥१७७॥ इतिहरितवर्गः
SuShkANi kaPavAtaGnAnyetAnyeShAM PalAni ca| haritAnAmayaM caiSha ShaShTho vargaH samApyate||177|| iti haritavargaH
These in their dried condition and their fruits are effective in curing kapha and vata. Thus, ends the sixth section on greens. 
However various Smritis and Puranas ban the usage of onion and garlic along with many other vegetables in everyday meals and naivedya. If it was forbidden in daily life of dvijas it is obvious it is forbidden in temples.
Manu Smriti Section 5 Verse 5 says this:
लशुनं गृञ्जनं चैव पलाण्डुं कवकानि च । अभक्ष्याणि द्विजातीनाममेध्यप्रभवानि च ॥ ५ ॥
laśunaṃ gṛñjanaṃ caiva palāṇḍuṃ kavakāni ca | abhakṣyāṇi dvijātīnāmamedhyaprabhavāni ca || 5 ||
Garlic, leeks and onions, mushrooms and all that proceeds from impure things, are unfit to be eaten by twice-born men.—(5).
'Abhakshya' means 'forbidden' or food that is not meant to be eaten.
किसलयः पञ्जवोऽग्रप्ररोहः । कयाकु( किम्पाकु)शच्छत्राक: । लशुनं प्रसिद्धम् । निर्यासो वृक्षत्वग्भूतो घनोभूतो रसो हिङ्ग्वादिः । किसलयादयोऽप्यभक्ष्याः ।। ३२ ।।
32. Nor young sprouts, mushrooms, garlic, and substances exuding (from trees)
26. (Likewise) red garlic, onions, and leeks.
27. Likewise anything else which (those who are learned in the law)
28. Mushrooms ought not to be eaten; that has been declared in a Brāhmaṇa;
1.Now, therefore, we will declare what may be eaten and what may not be eaten.
33.For eating garlic, onions, mushrooms, turnips, Sleshmântaka, exudations from trees, the red sap flowing from incisions (in trees or plants), food pecked at by crows or worried by dogs, or the leavings of a Sûdra, an Atikrikkhra (penance must be performed).
3.Likewise, if he has (knowingly) eaten garlic, or onions, or red garlic, or any plant which has a similar flavour (to that of garlic or onions), or the meat of village pigs, of tame cocks (and other tame birds), of apes, and of cows.
34.For eating (unawares the mushroom called) Khattrâka, or (the mushroom called) Kavaka, he must perform the Sântapana penance.
36.Likewise, (for eating unawares) the juice flowing from an incision in a tree, (plants raised in) unclean substances (such as excrements and the like), and the red exudation of trees.
Vishnu Smriti (66.12) adds that 'abhakshya' foods may not be offered as naivedya.
नाभक्ष्यं नैवेद्यार्थे ।।१२॥
12. (He must) not (give) forbidden food at the offering of eatables;
Pauranic sources forbid similar type of vegetables.
Garuda Purana Moksa Khanda Chapter 14
वृन्ताकं चुक्रशाकश्च बिल्वमौदुंवरं तथा । पलाञ्जुर्लशुनं वृन्तं कलञ्जं च तथा द्विजा ॥ ३,१४.४३ ॥
I shall now tell you of things that have no essence.
42-47. The chaff of gram, Medhyā (a fruit-bearing plant), gruel, the holy basil, parched or fried grain, Upodvaji, gourd, Kosalaki (?) the egg plant, tamarind, Bilva fruit, Udumbara fruit, onion, garlic-these are essenceless in all times.
Kurma Purana Vol 2 Chapter 17
वृन्ताकं जालिका शाकं कुसुम्भाश्मन्तकं तथा। १८॥ पलाण्डु लसुनं सूक्तं निर्यासं चैव वर्जयेत्।
छन्राकं विड्वराहञ्च शैलं पीयूषमेव च॥ १९॥ विलयं सुमुखजैव कवकानि च वर्जयेत्।
The brinjals, the vegetables, safflower, asmantaka (a kind of plant), onion, garlic, sour articles, the gum of the trees, should not be accepted.
Similarly, the mushrooms, the village boar, Sleymantaka fruit, bee stings, or the milk of a cow during the first seven days of calving, the eatables named Simukha, and the mushroom, should be discarded.
Skanda Purana Kasi Khanda Chapter 40
- Hence I shall tell you what things are prohibited. By avoiding them from afar, a man can prevent his fall in hell.
9. Onion, shit-thriving pigs, Šelu, garlic, carrot, Gopiyusa (milk of a cow before the lapse of ten days from calving), Tanduliya (a grain growing in faecal rubbish) and mushrooms all these are to be avoided.
Padma Purana Bhumi Khanda (pg 788) Chapter 56 [The entire Padma Purana is included in this link]
19b-24. (But) he should avoid egg-plant, stalks of lotuses, safflower, gold or silver, onion, garlic, sour gruel, a thick fluid substance; so also chatraka (a kind of mushroom), vidvaraha, greasy milk of a cow during the first seven days of calving, vilaya (a particular product of milk) and mushrooms.
By eating the small red variety of garlic, blossoms of kimsuka, a gourd, so also udumbara, bottle-gourd, a twice-born becomes fallen.
Brahma Khanda (pg 830) Chapter 19 says the same.
O brahmana, a man who eats an onion, garlic, a potherb, bottlegourd, a small red variety of garlic and meat, should observe the Candrayana-vow.
Additionally Padma Purana in Brahma Khanda Chapter 9 describes how Alakshmi (Jyestha) was asked to reside in onions and garlic and mushrooms.
Then Alaksmi (i.e. Evil Fortune), of a dark face and red eyes, having rough and tawny hair, and having an old body, sprang up. She,the eldest one, said to the gods: "What should I do?"
O you eldest one, causing filth, your stay will be in the houses of those mean men who eat mushrooms and a left-over coconut. There is no doubt that you will stay in the houses of those men of sinful thoughts, who eat sesamum-flour, bottle-gourd, garlic, shoots of young plants, a species of kadamba (called kalambaka) and onions.
Chapter 232 (pg 1622) of Uttara Khanda says the same. Perhaps this is the reason why onion garlic and other vegetables are not consumed.
Jyestha Devi, covered with gems, wreaths and garments came up. When the goddess came up, she said: "What should I do?"
O goddess, causing poverty, always live in the house of those who eat sesamum, flesh of animals struck with a poisoned weapon, kalinga, pot-herb, garlic, mushrooms, vid-varaha, bilva, kosataki-fruit, bottle-gourd, and onions.