Can Plastic pipe(cpvc) be used in place of copper to hook up a tub valve?
yes. pex, and cpvc are for the water supply. pvc is not used as a water supply inside the house. cpvc is the yellowish looking plastic pipe and uses a kinda of orange glue. pex is the flexible plastic pipe and uses crimp rings.
Many homes have all piping in CPVC and PVC. If you are making a transition from copper to CPVC, use a female copper adapter and a male CPVC. The female plastic adapters often crack and in some States are not code.
CPVC will work - I think the pex tubing is a better solution than the CPVC - fitting are better and pex is easier to work with than the rigid CPVC.