Catheter-based optical method for improving treatment of cardiac arrhythmias