The only sensible thing would be to have a pipeline, with zero trucks doing that work in its place, plus a carbon tax on top of that oil to adjust the price.
The carbon tax could be applied uniquely to oil brought on the pipeline so as to equalize the cost of that oil with that which will instead be brought over on trucks.
Which means no misaligned incentives to increase oil consumption but also no inefficiency from trucks doing the work in its place. That tax revenue is effectively new wealth since it represents the saved inefficiency of the alternative of having no pipeline.