Gama rays will also kill all organic life within 500 meters ... So firing one of those things will wipe out all life on your ship, and the enemy craft at the same time.
X-Ray exposure can be a bit longer before you fall over dead - however you still have the same problem of irradiating your own ship .
X-Rays and gamma rays can be focused thru a beam. There is no residual radiation, either at the point of release or around the target. Robot aircraft will deliver such attacks with no danger to our people.