Short answer. Yes.
Basically the drill knows no different, 12V, 18V is 12V, 18V to the drill. But if you want to be 100% sure check the Makita website to see if they are compatible... Personally I don't bother and have been swapping ni-cds for Ni-Mh for ages...