All will require you to take your shoes off. Going inside the floor, carpet and expecially the food serving hall is not clean what with bits of food laying on the floor and some drink spilled.
So the best thing I found is to wear double socks ...one main socks which are normally long and then wear on top a second pair that are like small ankle sports socks. You go to the temple and take your shoes off and then walk about inside wearing double socks so when you are going out remove the top socks and put them in your pocket or bag and go out wearing clean socks and shoes.
As it stands people go in wearing clean socks and clean shoes but go out wearing dirty socks and dirty shoes by wearing double socks you go in wearing clean socks and clean shoes and go out wearing clean socks and clean shoes
Main pair long socks
Short Ankle Socks
Problem solved ..go in clean and go out clean