Light control of the nanoscale phase separation in heteroepitaxial nickelates