i have an ibanez gio with a crappy ibanez tremelo and i want to know if i can put locking nuts on it because it goes out of tune every time i dive bomb.
You'd need more than just a locking nut, you'd also need a reliable tremolo that goes back to perfect pitch.

Might just be cheaper to sell the guitar and get a new one.
WTLTL 2011
No you can't for 2 reasons. One, you need fine tuners on your bridge because after locking it must be tuned. Two, you need enough room behind the nut because if you mount it on the headstock it will pull the strings too much when tightening the locks.