(may Allah be pleased with him) said:
I saw the Messenger of Allah (peace be upon him) many times enter the Masjid (mosque) with his shoes and offer Salah (Prayer) while wearing them.
This Hadith was related by
`Abdul-Razzaq Al-San`any in his "Musannaf".
The permissibility of offering Salah in one's footwear if they are Tahir (ritually pure) was authentically reported in many Hadiths. However, after being furnished with luxurious carpets, those who enter the Masjid should take off their shoes to keep the carpets clean and not to harm the people with the filth that may spoil the carpets, even if it is Tahir.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.