I would advise those who insitute a shoes-off policy in their homes to inform guests in advance that they require removal of shoes. That way the guests are able to bring some slippers with them. I think this is likely to be more accpetable than the custom in some countries of lending guests slippers (people are often uncomfortable about wearing somebody else's footwear). I would say something along the lines of "You may want to bring some slippers with you." I think this sends a clear message.
However, what if guests turned up with a pair of shoes to change into on arrival? In Canada and Scandinavian countries, people have indoor shoes that are strictly for wearing in offices and schools that are not worn outdoors. However, in the United Kingdom, it is very unlikely that people own a pair of shoes that are only worn indoors, unless they regularly attend a gym or do ballet (and they are not going to wear that sort of shoes to a dinner party).
What should the 'no-shoes' host or hostess do in that circumstance?
If the change of shoes had high heels, I would simply say "I am sorry would you mind not putting those on, heels are not very good for the carpet/ floor". They might step on somebody's shoeless toes and do some damage, as well.
If the change of shoes were low-heeled, that would be a different matter. One could ask if they had been worn outdoors, but I think this suggests a lack of trust. The simple thing to do is to put up with this and not invite this person again if the floor looks a bit dirty afterwards.
There are a number of subtle ways of dealing with this situation. One could ask "Do you buy those shoes today?" Or more to the point, "You do not have to put those on, we are very casual here." You may not be very casual at all, but it might put them off putting on their silly change of shoes.
This dilemma might present itself in summer, when somebody might prefer to wear flip flops rather than go barefoot. That is a little awkward, because one has no way of telling whether the flip flops have been worn outside or not. I suppose that situation might have to be suffered.
At the moment in Britain, it is very fashionable for girls to wear shoes that look very much like slippers, so it is not all that easy to tell the difference between shoes and slippers.
At the end of the day, you will invite some people back and some guests will not be invited to return to your home.