Absolutely it is safe. Neogiate your fare before hand. We have gone to Ocho Rios for years with our children and never had a problem. It is one of their favorite places. I feel safe walking on the streets, you just need to say no thank you to the vendors and you are fine. My daughter and I even took a carriage ride at mid-night from the Jamaica Grande around town and did not have a problem. The people are very nice and unfortunately the few bad ones give the place a bum rap.
I am going on memory but, make sure the taxi has a "tag". It indicates that the taxi is registered w/ the government. This will make sure you are not taken to other palces in route to your destination.
I can't remember what the "tag" says, but it's important that the cab has one.