This is an extremely frequently asked question by people who are want to remove their footwear on long road trips while driving. The short answer to this is, no its not illegal, and it is perfectly okay to drive without shoes.
But sometimes while driving for a long time with shoes on, it the feet acquire a temporary muscle memory to press the accelerator with shoes on. So if all of a sudden shoes are removed, there are chances that feet might subconsciously press the accelerator, clutch or brake more, or less than required. Thus, keeping this in mind becomes crucial.