You pay taxes when you are paying off your loan...
If you have a lot of assets you can just refinance your loan with more debt.
This basically defers the taxes to a later date and charges you interest for 'em. Which might be worthwhile, depending on how quickly and reliably your capital is growing.