Yes, this is allowed. The need for praying with shoes on may
generally arise in outdoor places like fields, tarmacs and pavements.
Similarly, this need may also arise on bare floors inside houses. There is
no harm in praying with shoes on in such places. One should just scrub the
sole of the shoe to get rid of the big chunks of mud and dirt that may have
accumulated there -- what little may remain is inconsequential.