In many applications of OFDM systems it is necessary to use a transmitting window, with a proper roll-off, in order to reduce out of band spectral leakage. In this case, i.e. windowed OFDM, the conventional cyclic prefix based Maximum Likelihood (ML) estimator of timing and frequency offset is not optimal and suffers from an error floor. In this paper we derive the optimum ML estimator for the windowed OFDM systems. Furthermore we have shown that by adding an appropriate receiving window to conventional ML estimator an excellent approximation to the optimal ML estimator can be achieved. This window is independent of SNR, unlike the windows needed in the optimum estimator, and therefore highly reduces the complexity.