No you still have to feed the hamster the same as you would if it were not pregnant. You can even purchase special vitamins from pet stores which give the hamster more nutrients throughout its pregnancy.
Hamsters as well as all pregnant animals, need food in order to live and to keep their babies safe and healthy. If anything they eat more during their pregnancy as they are losing a lot more nutrients through their babies. So you need to keep her well fed and ensure that she is getting the nutrients that she needs.
So overall no you should not leave the food out of the cage and if you do so the hamster will more than likely die.