Even if we could create software with no technical flaws, that doesn't guarantee it won't do something unexpected. "Bug" isn't really a 100% defined term, but generally anything which is "result not what user expected" could be considered a bug.
Plus we have code with self-learning/self-updating components, meaning it's not controlled code - it changes from a known state (what people wrote) to an unknown state (where it has ended up since then).
So... I think it's possible to write a piece of code which is technically bug-free within its scope/criteria. But we can never be sure those criteria remain correct over time. What people need from a tool can change, expectations can change, etc.
So within one definition, yes it's possible (and the FP fraternity can expand at length on that topic ;)). Within a more real-world definition looking further than code execution then no, not really. There will (probably!) always be gaps between what it does and what users want.