All-optical physiology resolves a synaptic basis for behavioral timescale plasticity