Taking your question at face value, what GRJ suggests about using diodes (vs. resistors) is the expedient solution.
But as everyone is alluding to, if this is for block signaling, there might be better ways. Perhaps you can share a bit more about what kind of signaling devices you're using.
For example, using a DC supply for signaling circuits can be cheaper, simpler to hook up, and use less power. Many (most?) signaling heads now use LEDs (DC) instead of incandescent bulbs. All circuitry that does the "neat" signaling stuff operates on DC. But it depends on what you have and what you're trying to accomplish.