This is a fascinating possibility, and apparently there's at least one researcher working on exactly that. [1][2]
On a much lesser level, I know this is a common reason for the divide between focus tips ("listen to white noise, silence, or wordless music to avoid distraction") and people's self-report techniques ("listening to intense EDM helps me code"). The goal isn't to avoid distraction, it's to break through tedium and help code longer without losing focus. I'd hardly be surprised if more intense things like LSD microdosing had similar effects.
Anecdotally, I know at least one very skilled programmer who insisted she couldn't work without marijuana. She didn't think THC did anything to raise her core abilities, but rather said that it stopped her from getting impatient or bored and let her work more methodically for longer.
[1] https://www.scientificamerican.com/article/the-problem-with-...
[2] http://www.tandfonline.com/doi/abs/10.1080/21507740.2014.990...