I actually agree with Sithara007 that betting might actually reduce the chance of match fixing. Because the bookies are getting the money and the kick out of betting already. But the thing is I think neither option is going to be 100% safe. Removing the option to place a bet might inspire people to try match fixing. But that is something that can also be done with the presence of legal betting. Even if gambling is legal, there will be a certain set of hierarchy.
In the current modern world, it is almost impossible to remove batting or gambling. So the best thing is going to be making it legal and trying to exploit the positives of it.