Optically generated lattice defects in halide crystals