Yes. Of course they can. There are too many variables involved in a race, and doping (and even rider performance) is only one of those. Of course the odds change depending on the type of race and how important tactics are.
But it also discounts the type of athlete who would dope. Maybe they're doping because they're not that great, or they're lazy, and their drugs allow them to take a shortcut to improved performance, but nevertheless one that can be overcome by a more talented athlete with a harder work ethic for example.
Tactics are clearly a huge factor on results. If they weren't then the best athlete would win all the time.
What about blood transfusions? When the blood has been taken out the performance will suffer giving an edge to the clean rider.