Yes, if it is a real cheese pizza with real tomato sauce.
For a complete diet, first you need to consume a sufficient quantity of food to get enough calories. Then you need a good source of protein and a supply of certain essential nutrients, like vitamins B12 and C, found only in certain kinds of foods.
Other vitamins, minerals, and useful nutrients like antioxidants should also be present in some amount.
Pizza mixes a lot of ingredients and can potentially meet all these requirements, as long as you eat enough slices.
First, pizza has plenty of calories, as dieters know. Protein is found in both the wheat crust and the cheese. Vitamin B12, which is found only in animal products, is supplied by the cheese, a dairy product. (Beware of imitations; real pizza cheese is stringy when hot.)
Vitamin C is found only in vegetables, the fresher the better, but canned tomatoes or tomato sauce will do. It would be preferable to include some slices of fresh tomato. A few greens on top, like parsley or broccoli or spinach, wouldn’t hurt.
Vitamin E is found in the olive oil that good pizzas are made with. Vitamin A comes from the tomatoes, vitamin D can come from the sun, and vitamin K you make yourself.
To top it off, tomato sauce is a good source of nutrients like lycopenes, with their rich antioxidant potential.
All pizza is not a perfect diet, but potentially you could survive for quite a long time.