Yes, it is possible to synthesise amino acids and sugars, and combine them to make proteins and complex carbohydrates. Difficult and expensive, but theoretically possible.
One problem is chirality (optical isomerism). Nature (generally) produces one optical isomer, whereas classical laboratory synthesis tends to produce both optical isomers in equal proportion. The body interacts with them differently, for example naturally occurring D-glucose is an important food source, but it's optical isomer (enantiomer) L-glucose has no nutritional value and causes osmotic diarrhoea. Modern methods of asymmetric synthesis rely on the use of chiral catalysts or reagent, and the optical purity of these catalysts and reagents can always be traced back to a natural source (generally of plant origin). So, this presents a problem - though maybe in a situation where humans had to synthesise their food in the absence of any other life, they could use compounds of human origin* to develop asymmetric chemistry.
*maybe harvested from the dead or an oppressed underclass in a dark dystopian future.