Optical Response of a Nematic Sample Submitted To a Periodic External Electric Field: Role of the Ionic Impurities