Light-induced conformational changes and energy transfer in red fluorescent protein