Optically-Controlled Adaptive Structures in Nematics and Chiral Nematics Doped with Nanoparticles