Dual-wavelength scanning is a technique eliminating the need of phantom repositioning for optical-CT gel readout. To further diminish artifacts caused by phantom impurities, we hereby propose a novel dual-wavelength imaging method based on phantom impurity recognition and correction. In this method, impurities in motion trajectories during phantom rotation are recognized at the reference wavelength via motion-tracking as a binary mask, which is then applied to correct impurity-contaminated pixels at the data wavelength. Compared with the existent dual-wavelength imaging method, the proposed method is demonstrated to be capable of reducing impurity-induced artifacts and improving imaging SNR and CNR in the same process.