"Optimal" seems to convey the impression, to me, that the temperature is the best, at the moment, but it's not the ideal. That is, under the current/surrounding circumstances, the temperature that is optimal would be... etc.
"ideal", is stating a temperature that would be perfect, but this doesn't mean that this temperature is achievable in all circumstances, and it sometimes can't be achieved at all.
Edit:, Able to confirm the usage and definition of "optimal":
The best, most favourable or desirable, especially under some restriction
As you can see, there is a restriction. That is, "optimal" is used when referring to the best possible ...whatever... under certain restrictions, such as the environment, or the conditions surrounding the time of occurrence.