The worshipper has the option to pray while wearing shoes or to take them off and place them between his feet, so that they do not cause harm to other worshippers.
It is narrated from Sayyiduna Abu Hurairah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When any one of you prays, he should wear his shoes or take them off and place them between his legs, and he should not cause harm to others with them."
Hadith Referenceصحيح ابن خزيمه / جماع أبواب الصلاة على البسط / 1009