Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) said: The Prophet (peace and blessings be upon him) led the prayer wearing his sandals, then he took them off. He (peace and blessings be upon him) was asked (about it), and he (peace and blessings be upon him) said: "Jibril came to me and informed me that there was filth on them. When you come to the mosque, look at your sandals; if anything is on them, clean it off."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4088