  Perovskites have been applied in a wide range of fields such as solar cells
and non-volatile memories due to their multiferroic nature and excellent
photo-electric conversion capabilities. Recently, two-dimensional (2D)
perovskites with a few atomic layers have been successfully synthesized,
attracting significant attention for potential applications. In this work, we
perform first-principles calculations to investigate an ultrathin prototypical
Ruddlesden-Popper phase, $\mathrm{Bi}_2\mathrm{FeO}_4$, with its thickness down
to one unit cell. We show that this compound could exist in two (meta-)stable
octahedral tilting phases, belonging to $P2_1/c$ and $C2/m$ space groups,
respectively. Using the optomechanical theory, we suggest that reversible and
non-volatile phase switching can be triggered using non-destructive terahertz
light. In addition, the two phases show distinct optical reflectance spectrum
in the visible light range, which can be used as an optical probe for phase
transformation. This enables both "write" and "read" in an all-optical route.
