Will these optocoupler configuration work to tri-state high voltage GPIOS?
The optocoupler design has a couple issues besides requiring lots of board space.  The biggest is that you're expecting U10--U12 to sink current into the emitter, which is out of spec.  Another is that when GPIO 1 goes from low to high, U1 and U2 present a brief short from VCC to ground.  Your LPs should be removed since they are actually high passes, and the optocouplers are fairly noise-immune anyway due to hysteresis and being current controlled.
A solution that fits well would be to use the TMUX7219.  It works with ~TTL input levels, can switch over 100mA bidirectional at 44V, has an on resistance of a few ohms only, a high z state, and in low z switches between two sources, in your case +12 and 0V.