A non-invasive, contact-less cardiac pacing technology can be a powerful tool in basic cardiac research and in clinics. Currently, electrical pacing is the gold standard for cardiac pacing. Although highly effective in controlling the cardiac function, the invasive nature, non-specificity to cardiac tissues and possible tissue damage limits its capabilities. Optical pacing of heart is a promising alternative, which is non-invasive and more specific, has high spatial and temporal precision, and avoids shortcomings in electrical stimulation. Optical coherence tomography has been proved to be an effective technique in non-invasive imaging in vivo with ultrahigh resolution and imaging speed. In the last several years, non-invasive specific optical pacing in animal hearts has been reported in quail, zebrafish, and rabbit models. However， Drosophila Melanogaster, which is a significant model with orthologs of 75% of human disease genes, has rarely been studied concerning their optical pacing in heart. Here, we combined optogenetic control of Drosophila heartbeat with optical coherence microscopy (OCM) technique for the first time. The light-gated cation channel, channelrhodopsin-2 (ChR2) was specifically expressed by transgene as a pacemaker in drosophila heart. By stimulating the pacemaker with 472 nm pulsed laser light at different frequencies, we achieved non-invasive and more specific optical control of the Drosophila heart rhythm, which demonstrates the wide potential of optical pacing for studying cardiac dynamics and development. Imaging capability of our customized OCM system was also involved to observe the pacing effect visually. No tissue damage was found after long exposure to laser pulses, which proved the safety of optogenetic control of Drosophila heart.