Traps for charge carriers in molecular materials formed by dipolar species: Towards light-driven molecular switch