Why are we permitted in our prayers to say "ashhadu anna aliyyan waliyullah" and why then don't we mention ALL the names of our masoomeen since they are also our representatives?
According to the opinion of all our jurists, past and present, affirmation of the wilayah of Imam Ali (a.s.) is not part of adhan. However, some jurists have advised us to recite it with the hope that God will be pleased with that addition and some have recommended its insertion for thawab.
For example, Agha Khui, in the Articles of Islamic Acts, Article 385, states: Ash hadu anna Amiral Mu'minina 'aliyan Waliyullah (i.e. I testify that the commander of the Faithful Imam Ali is the vicegerent of Allah) is not part of either Azan or Iqamah. It is however better to pronounce it after -Ash hadu anna Muhammadan Rasulullah- to seek divine pleasure.
Ayat. Fadlullah states: "Ashadu anna Aliyyan waliyy-ul-laah" is not part of the adhan or the iqamah and it is prohibited for one to regard it as a legislated part (of the adhan or iqamah). Further, it is not proven that (the recitation of wilayah) is recommended in them (i.e. the adhan and iqamah). . . however, it can be recited with the hope of acceptance without objection and recitation of it does not invalidate the adhan or iqamah . . ."Al-Masa'il-ul-Fiqhiyya," p. 72.
Shaykh Saduq (d. 381 A.H.) was of the opinion that the statement on the wilayah of Imam Ali (a.s.) was not part of the original adhan and was added by the extremist Shi'a known as mufawwidah: "The mufawwidah, may God curse them, have forged traditions and have inserted additions to the adhan. Thus, some of them add Muhammad and the house of Muhammad are the best of creation, twice. And in some of their quotations, after I witness that Muhammad is the messenger of God, I witness that Ali is the wali of God, twice. Some of them state, instead of that, I bear witness that Ali is truly the Commander of the Faithful, twice. There is no doubt that Ali is the wali of God, that he is truly the Commander of the Faithful and that Muhammad and his house are the best of creation, but all this is not in the original adhan. I have mentioned this so that those who are suspected of tafwid and who with deception include themselves in our community may be made known." (Shaykh Saduq, "Man la yaduruh al-faqih, 5th edition, Tehran: Dar al-kutub al-Islamiyyah, 1390 A.H., vol. 1, pp. 188-89).
As to why we mention Imam Ali (a.s.) and not the other Imams (a.s.), it is perhaps because he is the progenitor of all the other Imams (a.s.) Perhaps a case could be made that mentioning the names of other Imams would entitle the believer to thawab. However, this is something on which we would need to consult the jurist.