The optical is a single connector (TOSLINK) whereas analog is a separate lead for each channel. The sound quality will be pretty much the same it is just that the analogue - the device outputs the converted audio whereas in optical, the audio is already converted. Have a look at this http://www.tested.com/tech/632-hdmi-vs-optical-vs-analog-audio-whats-the-best-connection/.
I am not an audio expert so I am only telling you what I know.