I think (not 100% sure) that it is not *specifically* illegal to drive barefoot. What is illegal is to drive in a way that may be dangerous to others. It could thus be argued that you're driving in a manner which means your foot could easily slip off the pedals and that would constitute danger to others.