I think some water got into my olive oil bottle, which can make bacteria grow. I'm thinking of using that bottle for frying or baking, would that make using it safe?
You can't absolutely guarantee that it's safe. Botulism spores can survive to pretty high temperatures. (The botulism toxin itself is generally inactivated at cooking temperatures, but the spores are also dangerous.)
That said... the water will separate from the oil, so if you don't see a layer of water at the bottom, then it's fine. And although there is some risk if it is there, the odds are fairly low, and I personally wouldn't worry too much about it. (If the lid has been sealed, though, and you get off-gassing when you open it, then it's probably best to chuck it.)