Is it possible to be eligible to take the RD test and graduate in 4 years?

Yes, some schools offer programs which will start your rotations during your undergrad years, so that when you graduate you have completed your coursework and the required supervised hours, so your are eligible to take the RD exam. These programs are called Coordinated Undergraduate Programs (CUPs). UMass does not offer a CUP program. Most schools have programs like UMass, where you complete your B.S., first and then apply for a separate internship program.