Light-mediated silencing and stimulation of cardiac excitability, an important complement to electrical stimulation, promises important discoveries and therapies. To date, cardiac optogenetics has been studied with patch-clamp, multielectrode arrays, video microscopy, and an all-optical system measuring calcium transients. The future lies in achieving simultaneous optical acquisition of excitability signals and optogenetic control, both with high spatio-temporal resolution. Here, we make progress by combining optical mapping of action potentials with concurrent activation of channelrhodopsin-2 (ChR2) or halorhodopsin (eNpHR3.0), via an all-optical system applied to monolayers of neonatal rat ventricular myocytes (NRVM). Additionally, we explore the capability of ChR2 and eNpHR3.0 to shape action-potential waveforms, potentially aiding the study of short/long QT syndromes that result from abnormal changes in action potential duration (APD). These results show the promise of an all-optical system to acquire action potentials with precise temporal optogenetics control, achieving a long-sought flexibility beyond the means of conventional electrical stimulation.