Gavin Hyde
Yes, this is very much possible, most commonly done via a occupancy sensor. It is likely to be beyond the average homeowner, so I would suggest contacting a local electrician to install a occupancy sensor with timer function. this will do what you want, you can incorporate a manual switch to always have them on or use the sensor instead.