Here we applied photochromic spiropyran-based salts SP1 and SP2 as light-sensitive components of OFET-based non-volatile optical memory elements. Electrooptical programming by applying simultaneously light bias and gate (programming) voltage allowed us to demonstrate wide memory windows, high programming speeds (programming time of 0.5-20 ms), and good retention characteristics of the devices. It is remarkable that a minor difference in the molecular structures of the used spiropyran-based salts (the hydrogen atom in the structure of SP1 is replaced with the NO2 group in SP2) altered completely the behavior of the devices. Thus, OFETs comprising interlayers of the spiropyran-based salt SP1 showed a reversible photoelectrical switching which is characteristic for flash memory elements with good write-read-erase cycling stability. In contrast, devices based on the spiropyran-based salt SP2 demonstrated irreversible switching and operated as read-only memory (ROM). Both types of devices revealed the formation of multiple distinct electrical states thus resembling the behavior of multibit memory elements capable of high-density information storage.