Optimum altitude is the altitude for the best possible fuel efficiency in cruise i.e. fuel miles (distance covered against a specific amount of fuel).
In other words
Fuel Miles = TAS/Fuel Flow
The optimum altitude determined by FMC is based on aircraft gross weight and cruise speed in still air.
Optimum altitude varies with weight, lower if aircraft is heavy and higher if aircraft is light.
Temperature does not have much effect on optimum altitude. Why?
Mach No = TAS/LSS
Increase in temperature = Increase in LSS (local speed of sound)
In order to maintain a constant mach no TAS will have to be increased.
Increase in TAS = Increase in Fuel Flow
Since Optimum Altitude was all about Fuel Miles
and Fuel Miles = TAS/Fuel Flow (as mentioned above)
Increase in both TAS and Fuel Flow = No change in fuel miles.
No change in fuel miles = Temperature not considered for optimum altitude calculations.