Can I rely on a simple gas valve to shut off the gas?
That should do the trick for a start. You will smell gas when you disassemble the pipe and should dissipate. On the jobsite, when this is done, the longer pipe section is removed from the valve on the fed side (fireplace side) of the pipe and capped with a threaded plug with the proper tape sealant or pipe dope approved for gas fittings. A nipple and cap can be used too, instead of a plug. Its a variation of the same thing.

Do be careful on this, this should go without saying, you are dealing with some really explosive stuff here.