It's impossible. First due pseudoanonymous nature of Bitcoin, second due the impossibility of accurately establishing the economic nature of transactions (trading, sending, outputs integration, etc.).
I think it's better for the government to take the tax when fiat money withdrawing through exchange, maybe even when buying goods (taking into account the amount of fiat money entered into the system).