Yes, it is ok to talk to your dog like he is a human. Many dogs even understand words that their owners say to them. Dogs have a good sense of when an owner is upset or happy not only due to the words they are using but also the owner's tone of voice and hand gestures.
Even if your dog does not understand everything you are saying, you are not doing any harm by talking to your dog like a human, unless it becomes a problem for your personal life.