A standard RCA cable will likely transmit the S/PDIF format adequately, but we would always advise you to use a purpose-built 75 Ω coaxial S/PDIF cable.
You can purchase dedicated S/PDIF cables from most audio and music stores.
If you need to use an RCA cable, the shorter the RCA cable is, the more successful the connection is likely to be.