I'm sorry to hear that you're having this issue.
The TV won't pass a 5.1 signal through the optical output unless that signal is passed through the TV's tuner.
However, the digital signal from the cable box to the receiver should work good, and many receivers have a delay adjustment in the event that they don't.
The lag from using both outputs simultaneously is likely because the TV is switching from a digital signal to an analog signal to play through the speakers, and this process does have a slight lag, though it shouldn't affect picture performance. The external output and the TV speakers shouldn't be used at the same time, and would naturally result in an echo because of the switch from digital to analog.
Alternatively, you might check with your cable provider to see if a reset or an update is available that might fix the issue. In some cases, resetting or refreshing the box, or firmware updates are available to help with delay issues.
Do other inputs have the same delay?
I just purchased a samsung LED 55' TV (6000 series) and have a HD cable box hooked up to it using an HDMI cable.
I have used the optical out slot on the TV and hooked up it to my receiver, but by doing so I lose the 5.1 digital surround sound output. Sound is playing but its analog. so the connection is BOX>(HDMI)>TV>(OPTICAL)>receiver
Alternatively if i hook up the optical cable from my HD cable box directly to my receiver, i get 5.1 digital sound. But then there is a noticeable audio lag (video is faster) and if the TV volume is on (along with the receiver) there is a significant echo (caused by the delay). My receiver doesn't support HDMI. The connection is BOX>(HDMI)>TV - for video and audio
BOX>(Optical)>Receiver for audio <--the audio is delayed here