If you use a Logic Level driver and compute the series current limit Rs, then
you do NOT need a parallel shunt R.
For long cables near magnetics , you can add an RF cap.
But if you have an open collector then you can see the shunt R lowers the input impedance to stray noise. But there is no need to do that. Just drive it from Logic with a series R and assume the logic is 50 ohms for 5V uC logic.
simulate this circuit – Schematic created using CircuitLab
I assume you know how to estimate driver impedance Vol/Iol=Zol 50 Ω typ +/-50%
Due to Early leakage effects in any transistor, a base shunt R is preferred, instead of your diode shunt resistor.
You must examine the source impedance and current then CTR of the whole device with common-mode RFI interference.
A diode R-shunt of 10K won't do much at all for attenuating leakage when the diode impedance at the same level is around 100 uA when the drive current is > 20x this level.
It will however reduce the turn off time to allow slightly higher data rates.
To compute R for this scenario, you need to know the Bandwidth required, and RC breakpoint required to boost the turn-off decay time RC~0.6/bit-rate then opto-diode average input capacitance must be estimated to decide on R. It might be << 1k.
Your Model may vary
You must know the spectral impedance and energy of interference and it is inductive-current or capacitive-voltage coupled. This means you might need a shunt cap instead of a shunt R. The impedance ratio is important. In my case C coupling to shunt determines the attenuation ratio. The resistive coupling to a trace or cable has negligible conductance.