A new type of atomically thin synaptic network on van der Waals (vdW) heterostructures is reported, where each ultrasmall cell (approximate to 2 nm thick) built with trilayer WS2 semiconductor acts as a gate-tunable photoactive synapse, i.e., a photo-memtransistor. A train of UV pulses onto the WS2 memristor generates dopants in atomic-level precision by direct light-lattice interactions, which, along with the gate tunability, leads to the accurate modulation of the channel conductance for potentiation and depression of the synaptic cells. Such synaptic dynamics can be explained by a parallel atomistic resistor network model. In addition, it is shown that such a device scheme can generally be realized in other 2D vdW semiconductors, such as MoS2, MoSe2, MoTe2, and WSe2. Demonstration of these atomically thin photo-memtransistor arrays, where the synaptic weights can be tuned for the atomistic defect density, provides implications for a new type of artificial neural networks for parallel matrix computations with an ultrahigh integration density.