Yes, your new schematic is correct. the logic gate should be able to withstand the voltage, the resistor in it's output should be as high a value as possible though to give it as much protection as possible. The 2N3906 is only a small signal transistor so the base current only needs to be very low.
A far better way of doing this is to keep the resistor you added between the base and emitter, instead of connecting the other resistor to the logic gate, connect it to the collector of an NPN transistor. The emitter of that transistor goes to ground and the base is fed from the logic gate through another resistor. Sorry but I am unable to draw a schematic for you at the moment. It means two extra components, the NPN transistor and its new base resistor but it does make all the voltages fall within safe limits. It will however, invert the signal so you might need to change your logic functions slightly.
Brian.