The dynamic Ospreys wing, Wales' record try scorer with 55 Test touchdowns, is suffering from a muscle strain at the top of his leg.
Full-back James Hook (shoulder) and flanker Dan Lydiate (ankle) are both battling to be fit in time for Wales' possible quarter-final clash against Ireland on October 8.
Hook, Lydiate and now Williams could all miss Wales' crucial Pool D finale against Fiji in Hamilton a week on Saturday.
"We have had Shane scanned, and he has got a bit of a quad strain which we think he may have done against South Africa. We thought it was a haematoma, which is a knock, and he's played against Samoa," Wales coach Warren Gatland said.
"With Shane potentially being injured for next week, we need to look at the wing combinations. Shane might be a couple of weeks."
Gatland, meanwhile, has made 11 changes to the starting line-up for Monday's World Cup clash against Namibia at Stadium Taranaki.
Only centre Jonathan Davies, lock Alun-Wyn Jones, skipper Sam Warburton and number eight Toby Faletau remain from the side that defeated Samoa last weekend.
Fly-half Stephen Jones and back-row forward Ryan Jones both return after recovering from calf muscle injuries.
Scarlets playmaker Stephen Jones will win his 101st cap, breaking the Wales appearance record he previously jointly held with Gareth Thomas.
Jones had been poised to achieve that feat against England seven weeks ago, but his calf tightened during the warm-up at Twickenham and ruled him out of action since then.
Former Wales captain Ryan Jones, meanwhile, makes his World Cup debut after missing the 2007 tournament through injury, packing down at blindside flanker alongside back-row colleagues Warburton and Faletau.
There is a first Wales start since last November for Cardiff Blues prop Gethin Jenkins, with full-back Lee Byrne among nine players making full World Cup debuts.
Uncapped Scarlets hooker Ken Owens features on the replacements' bench, where his colleagues include Cardiff Blues scrum-half Lloyd Williams, the son of former Wales number nine Brynmor Williams.
Wales require a bonus-point victory against Namibia to keep them on course for a probable quarter-final appointment with Ireland in Wellington next month.
And they will encounter opponents still reeling from an 87-0 drubbing against world champions South Africa just two days ago. It will be Namibia's final game of a tournament that has seen them concede 185 points in three games.
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The entire All Blacks apparel line has been updated for 2013/14. Check out the New Zealand All Blacks polo.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Gilbert Blitz 8S rugby cleat is a great cleat at a great price of $69.99. Get a new pair of cleats today.
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
The All Blacks Performance t-shirt is black with hints of blue from the training jersey. Very Cool.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.