From a purely biological perspective, how does an optimal human diet look?
No, there isn't a single diet that can be recommended from a biological perspective.

The most popular diet from a pseudo-scientific perspective is the Paleo diet, saying we should eat what our ancestors in the Paleolithic were eating, but it makes a mistake of forgetting that our metabolism has evolved since then. There are also numerous other flaws in the Paleo diet but I won't go through them all.

The most notable example to use here would be dairy products, as we're among the few species that can drink milk at adult age. Drinking milk as an adult isn't normal, and yet we evolved the ability to do so. Some individuals can't drink milk, same goes for consuming gluten, nuts, and several other things, but the species as a whole can consume all of the above. Some people must avoid certain foods because of their individual genetic makeup though. Most evolved to process gluten and this ability is greatly responsible for the fact that there are 7 billion of us now. If you read an article "gluten is bad", remember that gluten grew the human race and without it at least a third of the world's population would die through starvation. If you read an article about the Paleo diet, remember we wouldn't be here if the agricultural revolution didn't happen.

The correct answer would be - humans can consume everything that isn't toxic and provides them with energy. We're very capable omnivores, which is probably one of the reasons why we've done so well as a species. In other words, you won't die from eating processed sugar. There are healthier and less healthy foods, but none will kill you.

You are correct, there are numerous answers (or attempts to answer) to this question, and the way the research is concluded definitely doesn't help. Research is mostly conducted through polls designed to prove the scientist's original unverified claim, and virtually no research is conducted on the biological level, e.g. what happens to the body when you consume a certain carbohydrate. The whole field became pseudoscientific. The "food pyramid" is...pretty much wrong.

Body needs proteins, body needs carbohydrates, body needs fat. You could come up with a vague answer if you eliminate the foods that body doesn't need, such as processed sugars, but it's still energy and you won't die from consuming it.

There is no scientific research that consumation of any food, or elimination of any food, affects life span. Meaning, there's no differential survival rate depending on what you eat.

To put things in perspective, imagine a lion preoccupied with attempting to answer whether it would be better for his body to eat an antilope or a gazelle. 10.000 calories is 10.000 calories and if he eats either he'll live another day.