What is the "optimal" age of a fighter pilot?
I can't directly tell you what's "optimal" because I don't know what that means, but the US Air Force does provide some basic demographic information so we can indirectly see what they consider to be a good age mix for fighter pilots. I used their report tool to get data on fighter pilots1 and it shows this breakdown:

17-24 :    43
25-34 : 1,341 
35-44 :   968 
45+   :    83
Total : 2,435


This isn't very fine-grained, but on the other hand we can immediately see that your example of someone over 50 is really at the extreme end of the curve: only 3.4% of fighter pilots are over 45.

Of course, this only applies to the USAF and it doesn't tell us anything about other branches of the military or about what other countries do. But we can say that the USAF appears to consider 25-34 to be the 'optimal' age: 55% of their fighter pilots are in that bracket.

(I should add a small disclaimer that I know nothing about the military, so hopefully I didn't make any stupid mistakes in pulling or interpreting the data.)



1 To be specific, the search criteria I used were: Active Duty Air Force only (excludes Air National Guard, Air Force Reserve and civilians); officers only; AFSC 11FX specialty (fighter pilot) only. The data is from April 2015.