Thermally activated escape from a periodically modulated optical trap