Mallia clattered into the head of the Springboks scrumhalf after only 11 seconds of the match in an attempt to charge down a kick. Williams played no further part in the game, which South Africa won 22-21.
The 26-year-old outside back went unpunished on the pitch but was later cited and the SANZAAR judicial committee found him guilty of "reckless or dangerous" play, banning Mallia from playing until Aug. 19.
"The judicial committee considered the act of foul play was reckless, with a high degree of danger and had a considerable impact on the victim player," read its judgement.
The judgement, though, said the committee had heard evidence from the referee and Argentina coach Michael Cheika about "how successful charge downs of kicks are viewed by match officials and as to how coaching of players is conducted as a consequence".
"The committee decided that a mid-range sanction would be wholly disproportionate to the player's fault and that the foul play merited a low-range entry point of two weeks," the judgement continued.
Mallia will miss this Saturday's World Cup warm-up between Argentina and South Africa in Buenos Aires but will now be available for the Pumas' crunch opening game of the tournament proper against Pool D rivals England in Marseille on Sept. 9.