Life-threatening cardiac arrhythmias such as ventricular tachycardia and fibrillation are common precursors to sudden cardiac death. They are associated with the occurrence of abnormal electrical spiral waves in the heart that rotate at a high frequency. In severe cases, arrhythmias are combated with a clinical method called defibrillation, which involves administering a single global high-voltage shock to the heart to reset all its activity and restore sinus rhythm. Despite its high efficiency in controlling arrhythmias, defibrillation is associated with several negative side effects that render the method suboptimal. The best approach to optimize this therapeutic technique is to deepen our understanding of the dynamics of spiral waves. Here, we use computational cardiac optogenetics to study and control the dynamics of a single spiral wave in a two-dimensional, electrophysiologically detailed, light-sensitive model of a mouse ventricle. First, we illuminate the domain globally by applying a sequence of periodic optical pulses with different frequencies in the sub-threshold regime where no excitation wave is induced. In doing so, we obtain epicycloidal, hypocycloidal, and resonant drift trajectories of the spiral wave core. Then, to effectively control the wave dynamics, we use a method called resonant feedback pacing. In this approach, each global optical pulse is applied when the measuring electrode positioned on the domain registers a predefined value of the membrane voltage. This enables us to steer the spiral wave in a desired direction determined by the position of the electrode. Our study thus provides valuable mechanistic insights into the success or failure of global optical stimulation in executing efficient arrhythmia control.