The short answer is yes, it is safe to feed your dog canned food only. However, it's important to make sure that the canned food you're feeding your dog is a high-quality product that meets all of your dog's nutritional needs.
If you're not sure whether or not the canned food you're feeding your dog is high-quality, talk to your veterinarian. They can recommend a brand of canned food that meets all of your dog's nutritional needs.