They might not let you deep inside the yard to walk around because it's an active shop with active yard movements for both CCCR and Mass Coastal freight equipment. But I'm sure they get that question every single day and have a ready answer as to the best photo spots. I've heard nothing but great things about the staff there when it comes to dealing with everyone from train-curious kids to seasoned railfans, so strike up a conversation and see where it gets you.
The yard isn't buffered on any side by many trees so there's wide-open views:
1) from the bus terminal parking lot on the west side (right next to the engine house if you want closer look at the locos)
2) couple spots on
Yarmouth Rd. on the east side (few more trees, but as you can see it's got frequent openings)
3) parking lot for the sports/entertainment complex inside the old roundhouse on the northwest side (good also for getting pics of the roundhouse structure)
4) parking lot of DJ's Family Sports Pub in the old depot building on Yarmouth Rd. near the Route 28 intersection (the RDC is often parked behind DJ's at end of one of the tail tracks)
Can't see too much from the Route 28 grade crossing that doesn't have a better view from DJ's, so should be able to get every shot that's worth taking by walking up and down a 1500 ft. stretch of west-side parking lots and east-side Yarmouth Rd. + parking lots.