Resistive switching behavior and optical properties of transparent Pr-doped ZnO based resistive random access memory