The answer to your question is yes it is certainly possible.
At one time it was thought that there was something special about "organic" chemicals which meant that they could not be artificially synthesised out of fundamental elements. In 1828 Frederick Wöhler synthesised urea (CO(NH2)2) which is often taken as the first demonstration that the organic v inorganic distinction was not a sound one (for more on this see the Wikipedia article on Wöhler synthesis.
As far as we know all essential human nutrients can be synthesised from inorganic ingredients, even complex molecules such as Vitamin B12.
Other contributors have pointed out that organic pathways for synthesising our food have evolved over long periods to be very efficient - at least in the conditions prevailing on Earth. You haven't ruled out copying biochemical pathways using chemicals that are entirely of inorganic origin. Anyone trying to do this seriously could create glucose (for example) by artificially creating enzymes (perhaps via artificial DNA) to do the job. The thing is that we already have self-replicating and repairing machines to do that already (plants).
There might be circumstances when we needed to use artificial synthesis. I can think of two science-fiction stories that deal with this question, the first of which goes into some detail:
- The Moon is Hell by John W. Campbell, in which astronauts are stranded on the moon and forced to make food from what they find there.
- Technical Error by Arthur C. Clarke, in which a man is accidentally rotated through the fourth dimension. His employers contemplate the difficulty caused by the "handedness" of many biological molecules meaning they would have to artificially synthesise many of his foods.
It may be that a future expedition to Mars (say) might have to think about these things.
A little searching fails to come up with standard inorganic syntheses of glucose and similar substances. The reason for this is almost certainly because it is so easy to use organic inputs. Glucose is easily made by the hydrolysis of starch. Starch is very common and cheap. Even l-glucose is usually made out of organically derived precursors (or sometimes even using d-glucose).
UPDATE: sources etc
One problematic question is: where do you get your input for making nutrients? As others have pointed out, exactly where to draw the line is difficult.
This problem starts in defining what is alive in the first place. Do you count viruses (which can go down to a few thousand base pairs of RNA) or satellite viruses (STobRV has only 359 base pairs) or prions? In a sense these are "just" very large molecules. But then really simple bacteria are not many orders of magnitude more complex. As an aside most systems of ethics that do not permit eating meat do not make an alive/non-alive distinction, choosing some other aspect such as sentience, though Jainism comes close to doing so.
The second problem is, if we reject living things as sources of food, how far removed from those living things are we allowed to get? You say no cells in any state including "dead". That would exclude (say) fruit even though most fruits are expressly created by plants in order to be eaten (and in some cases must be eaten) - something that vegans, jains, fruitarians and others would be happy with eating. If we could use dead material things would be much easier.
But would you also include hydrocarbons (coal, oil, gas) which were once living organisms? If you do, then you are in difficulty because terrestrial carbon is recycled through the biosphere. All CO2 was (to a close approximation) once a part of a living thing. If you take that position then of course you are going to have to go off-planet to find your source chemicals and your problem becomes very much harder.
I was assuming that you were restricting yourself to consuming cells that retain some of their cell structure but had not completely degraded. If that is where you draw the line then there are ample sources of raw materials on earth.
Genetic modification is much more science fiction though not entirely impossible. Some nutrients could be made by humans without much difficulty. Our inability to manufacture vitamin C is down to one missing enzyme (L-gulono-gamma-lactone oxidase) which is present in most vertebrates (I think of mammals only guinea pigs, humans and some bats are unable to synthesise it). You could certainly imagine some very careful genetic modification changing humans so they no longer need to consume vitamin C.
But photosynthesis would be much harder. Chloroplasts (which do the job in most plants) are really a very primitive form of life living in plant cells which may independently reproduce (and for that reason might be excluded by you - they aren't "cells" but they have membranes). They could easily end up in conflict with our mitochondria (since intracellular conflict between organelles is possible) and you would need to do enormous amounts of work to make human cells co-operate with them properly.
More in keeping with your theme would be adding photosynthetic systems directly to human cells along with a suite of enzymes to manufacture all the things we cannot. That is of course in principle scientifically possible (since plants do it) but much harder than it looks. Living systems are very complicated and small changes can have unexpected consequences. Even very minor genetic modifications are problematic. The human autotroph is likely to be some way off.