Media playback is not supported on this device
The League One side were ahead after just three minutes as the forward scored with a low left-foot shot.
Rovers went two clear with 20 minutes remaining when Williams netted from close range after a defensive error from a corner by Oliver Crowley.
Bohan Dixon was unlucky to see his 20-yard free-kick tipped round the post by Doncaster keeper Thorsten Stuckmann.

The new rule comes from Iran's Supreme Council of Cyberspace and firms have been given one year to comply.
Campaign group Privacy International described it as "extremely worrying" but said it could prove difficult to enforce.
Iran's most popular messaging app is Berlin-based service Telegram, believed to be used by one in four Iranians.
Messages shared via Telegram, which is free to use, are encrypted and can be seen by many users at once.
Telegram could not be reached for comment but reports circulating on social networks that it has decided to comply are understood to be false.
Most social networks are officially blocked by the state but lots of people are able to access them via services like Virtual Private Networks (VPNs), which mask a browser's geographical location.
The country's president, Hassan Rouhani, has active Twitter accounts in English and Persian.
In my view, Telegram has a tough job ahead of it when deciding whether to go ahead with what the government wants.
People are worried about losing it but they are also saying they will stop using it if the firm complies with the new law.
This is a big thing for people in Iran. They are very sensitive about security.
If Telegram does what is asked, then the government will have control over the content, it can monitor who is saying what, and it can arrest people.
The app was shut down briefly last year for refusing to comply with the government - and that added to its popularity.
Just recently BBC Persian covered a story about high school students protesting about their exams - they created a Telegram group to mobilise and inform other students about the protest.
The group got 20,000 subscribers and the protest went well. But as soon as it got media coverage the government told the group administrators to close it down.
In a short time, the number of subscribers came down to just 300.

The Australian Open champions, seeded fourth in Monte Carlo, sealed victory in 67 minutes.
The Briton and the Brazilian went 4-0 up in the opening set and held firm to remain top of the ATP doubles rankings.
A reflex Murray volley sealed the match and improved their season record to 17 wins and only three defeats.
In the final they will meet either Pierre-Hugues Herbert and Nicolas Mahut, who beat Murray's brother Andy and Dominic Inglot on Friday, or Juan Sebastian Cabal and Robert Farah.
Brazilian Melo would have regained his individual number one doubles ranking with victory alongside Dodig of Croatia.
But the second seeds, playing in their first semi-final of the year, were unable to take any of their four break points and decisively lost serve in the ninth game of the second set.
Never want to miss the latest tennis news? You can now add this sport and all the other sports and teams you follow to yourpersonalised My Sport home.

Sannah Javid, 26, of Frank Slater House, Green Lane, Ilford, was taken to King George Hospital on Tuesday after officers were called to her flat.
She died in the early hours of Wednesday. Post-mortem tests found the cause of death was multiple injuries.
Metropolitan Police detectives believe Ms Javid knew her attacker.
The force said a 37-year-old man was arrested on suspicion of her murder on Saturday.
Det Ch Insp Tim Duffield added: "We are appealing for anyone who may have seen or heard something suspicious on the evening of Tuesday, 2 December to call the incident room at Hendon."
Andy Williams' double saw Doncaster ease to a comfortable victory over National League North side Stalybridge.
[NEXT_CONCEPT]
Instant messaging apps must store data about Iranian users inside the country, Iran has ordered.
[NEXT_CONCEPT]
World doubles number one Jamie Murray and partner Bruno Soares reached the Monte Carlo Masters final with a 6-2 6-4 win over Marcelo Melo and Ivan Dodig.
[NEXT_CONCEPT]
A 37-year-old man has been arrested on suspicion of murder after a woman who was found in her east London flat with serious injuries died.