Can you configure the flue to have an offset so it goes out the wall behind the fire rather than the roof?

Yes, offset bends are available for the flue systems. The best option would be to speak with a local installer who can give you specific advice about a flue system to suit your home.

Do note that a general rule of thumb is to try and avoid having any offsets in the first length of flue pipe, no more than a 45 degree angle and no more than 600mm centre to centre of the offset. Offsets do require more maintenance with cleaning etc. and can have adverse effects on the fires performance versus a typical vertical flue.