Praying in your shoes-The forgotten Sunnah :
Abu Sa’eed al-Khudri said: “While the Messenger of Allaah (peace and blessings of Allaah be upon him) was leading his companions in prayer, he took off his shoes and placed them to his left. When the people saw that, they took off their shoes too. When the Messenger of Allaah (peace and blessings of Allaah be upon him) finished his prayer, he asked, ‘What made you take off your shoes?’ They said, ‘We saw you take off your shoes, so we took ours off too.’ The Messenger of Allaah (peace and blessings of Allaah be upon him) said, ‘Jibreel (peace be upon him) came to me and told me that there was something dirty on them.’ When any one of you comes to the mosque, let him look and if he sees anything dirty on his shoes, let him wipe them and then pray in them.” (Abu Dawood, 650; classed as saheeh by al-Albaani in Saheeh Abi Dawood, 605).
------------------
One of the reasons why the Prophet (peace and blessings of Allaah be upon him) prayed wearing shoes is to be found in the hadeeth, “Be different from the Jews, who do not pray in their shoes or in their leather slippers (khufoof).” (Abu Dawood, 652; classed as saheeh by al-Albaani in Saheeh Abi Dawood, 607). That is regarded as mustahabb for the purpose of differing from non-Muslims
However if the mosque is furnished with carpeting, then the mosque should be kept clean of shoes, and no one should enter wearing shoes lest the place be made dirty. (Fataawa Samaahat al-Shaykh ‘Abd-Allaah ibn Humayd, p. 81). Moreover the furnishings of the mosque are a waqf which should not be damaged or destroyed, and if dirt gets onto the carpets it will offend those who pray and prostrate on them. Hence no one should enter wearing shoes and walk on the carpets in the mosque in shoes, lest he damage them or make them dirty.
The one who is keen to follow this Sunnah can apply it when praying at home, or when praying in places where there are no furnishings or carpets, such as parks, beaches and out of doors, etc. If this action confuses some of those who are unaware of the Sunnah, he should explain to them that it is Sunnah before he does it, so that they will not find that odd. We ask Allaah to make us among those who adhere to the Sunnah and strive to follow it until He joins us with the author of the Sunnah (peace and blessings of Allaah be upon him) close to the Lord of the Worlds. Ad Allaah is the Source of strength.