I don't envision any problems or safety issues with cutting-down the *ends* of the handlebars, Peter.
I have done so myself numerous times in the past with no issues to date unless there is some unusual feature in how the 'bars are constructed or formed (i.e. carbon, with inserts). Usually, the cut amount is less than 2cm at each end.
You can use a saw with saw guide or a pipe cutter. If the latter, lube the area first to prevent surface marks that could form stress risers inside where the bar-ends will clamp. A neater job can result if you turn the cutter knob incrementally with each turn rather than trying to get through the entire thickness in just a couple passes. Your cutting wheel will last longer, too. I have sometimes used an emery or carbide cutting disk with my chop saw and v-block tubing clamps with the handlebars out of the bike.
I would suggest smoothing the cut edges of the aluminum with a bit of emery cloth or a file so they won't be sharp, but otherwise, all seems fine in my opinion. If not, I'm sure someone will arrive with suitable cautions soon.
Best,
Dan.