The easiest solution would be to use the lazy (non-greedy) *? operator:
>>> re.sub(r"a.*?b","ab","acbacbacb")
'ababab'
This might however have an impact on performance. Because of the structure of this regex, you can just as well use the equivalent
re.sub(r"a[^b]*b","ab","acbacbacb")
which could perform better, depending on how good the optimizer is.
If you have even more a priori knowledge about the structure of the .* part, you should make it even more explicit. Say, for example, that you already know that between the a and the b there will be only c's, you can do
re.sub(r"ac*b","ab","acbacbacb")