Optimal Upper Bound for the Correlation Energy of a Fermi Gas in the Mean-Field Regime