Not entirely true that the only power supplied to a pellet is compressed air; sometimes, you'll get dieseling from any lubricants that are in the compression chamber, on the pellet or in the barrel. Some air rifle manufacturers actually tell you to add a specific type of oil in the compression chamber for controlled dieseling so you get more speed from the pellet.
As for shortening the barrel length, you'll lose a lot of speed if you do. The longer the pellet stays in the barrel, the faster it'll come out of the muzzle, because a longer barrel utilizes more of the compressed air to propel the pellet. If the pellet leaves the barrel too soon, it'll waste a lot of the air that's pushing it.