You won't be able to use the optical out, but you can use the bank of audio i/o plugs on the board. According to the manual, in 8 channel mode, the plugs are the following:
Light Blue - Line In
Lime - Front Speaker Out
Pink - Mic In
Orange - Center/Subwoofer
Black - Rear Speakers
Grey - Side Speakers
You could use your old Z313 as either the front, side, or rear speakers. It would just be a matter of figuring out which ports to plug which wires in to. For example, if you wanted to use your Z313s as your fronts, your configuration could be as follows
Lime (Front Speakers) -> Z313 input
Orange (Sub/Center) -> Z506 Orange
Black (Rears) -> Z506 Black
Grey (Side) -> Z506 green (essentially using the front input on the Z506 for your side channels)
Two notes:
1. You will need to have both subs connected to make this work. Your Z506 sub will take the low frequency channel coming from your motherboard as well as take some of the lower frequencies to center/rear/sides. Your Z313 sub will only be used to handle the lower frequencies sent to the fronts.
2. You will have volume controls on both your Z506 and Z313 speakers. You might want to find a setting for each that sounds good and just adjust the volume in your OS.
All in all, I would imagine it would sound quite good.
Good luck!