This paper proposes a new estimation and compensation approach to mitigate several linear and widely linear effects in coherent optical systems using digital signal processing (DSP) algorithms. Compared to most of the available strategies that employ local estimation and/or compensation algorithms, this approach performs a global impairments estimation and compensation based on Nonlinear Least Squares. The proposed method estimates and compensates for the chromatic dispersion (CD), carrier frequency offset (CFO), in-phase/quadrature (IQ) imbalance, and laser phase noise (PN) in two steps. Firstly, it estimates the quasi-static parameters related to the CD, CFO, and both transmitter and receiver IQ imbalance. Secondly, it estimates both transmitter and receiver lasers’ phases and compensates for all the imperfections by using a Zero-Forcing (ZF) equalizer. Simulations show the effectiveness of the approach in terms of statistical performance and computational time. The estimation performance is assessed by computing the Cramér Rao Lower Bound (CRLB), while the detection performance is compared to a modified Clairvoyant equalizer.