How to change objects texture using python in BGE?
You don't even need to write python code, you can change the material with level of detail (LOD)



Create different objects (or duplicate the same mesh Shift-D if don't want lower polygon count) 


Assign the textures to the objects -
And all to the highest resolution object as LOD objects.
Adjust the distance for where they should be displayed.
Move all but the highest resolution object to an invisble layer.


The effect is visible in the viewport:



A python soultion would be to combine snippets from:


Python - Set material to material slot
How to get the distance between two objects in the game engine?