In memory circuits, synaptic engrams consist of ensembles of strengthened synapses that form between engram neurons encoding distinct memory traces. As proposed in Hebb's seminal postulate, these potentiated synapses enable the functional cell assembly essential for neuronal wiring. While existing technologies can track potentiated synapses in behaving animals, understanding in vivo spatial-temporal organization of synaptic engrams remains challenging. We developed an in vitro hybrid system that integrates digital light processing with optogenetics and used optical stimulation to synchronize the firing patterns of two-neuron modules within a network, supporting Hebb's postulate experimentally. After illumination, we observe that synapses predominantly strengthen on dendrites between the two illuminated neurons, reflecting neuron responses to the wiring activity. This presents a robust conceptual foundation for our methodology. Our setup also allows direct target illumination and strengthening of synaptic ensembles, granting spatial-temporal control over the synaptic networks. Building on Hebb's theoretical framework, our system offers a solid experimental approach to test the core principles of synaptic engrams