Nuclear quadrupole deformation effects on pionic and kaonic X-rays