Text this: Optoelectric coordinated modulation of resistive switching behavior in perovskite based synaptic device