Yes!

It is safe for your dog to have tomatoes. Dogs can eat the flesh and fruit of a ripe tomato. However, the green parts of the plant contain a toxic substance called solanine.