Yeah, completely safe. If your ever not sure, just google nato vs. sammi specs on different cartridges. My first experience/lesson was learning the difference between .223 and 5.56, sammi being the spec for the former. They are dimensionally identical, at least, they are drawn to be dimensionally identical. The difference is that (and this is a huge nutshell moment) sammi specs are more tightly controlled. The test bores, the powder weights, the cartridge dimensions, are all a little more loosely controlled with the nato rounds, resulting usually in a little hotter load and CAN have some dimensional differences, even though they are supposed to me the same. Hence, I will feed either into my AR with a 5.56 stamped barrel, but will stick with .223 only for my .223 hunting rifle. There's some great articles out there on this, and worth a read.
It's actually interesting too, how the .223 is dimensionally the same but not generally as hot as the 5.56, BUT the .308 is actually .308, where as the 7.62 x 51 is considered identical, but measures .311 in a lot of nato surplus. In this case, you want to steer clear of nato ammo in your .308 hunting rifles. I mean, it will be okay in a pinch, or for a few trigger pulls, but I wouldn't feed it a steady diet of nato.
The differences in the pistol cartridges are so very slight that your gun may never know the difference.