The first question to ask is - do you actually need to optimize the code ?
What problem are you trying to solve ?
You can spend a lot of time tweaking and changing - but unless you actually have a goal, then you're more likely just going to spend lots of time doing more and more tweaking.
IF I was going to tweak this code - I'd iterate across the true/false list.
for index in len(b):
if b[index]:
a[index] += 1
That way you're only touching list "a" when you need to, rather than every time.