Yes it can be done is the simple answer.
My question to you is this: Is it a straight axle or an arched (bent) axle? Arched axles have camber built it to help the trailer track straight when pulled. Those the average person shouldn't try to modify. It would inevitably mess the axle up into unusable. If it is a straight axle the simplest way I have done it before is this:
Measure the axle and mark center.
From center, mark outboard on both sides, half of the desired removal length plus 1/2 inch.
Cut the axle at the outboard marks.
Drill the original axle tube halves, on at least three sides, two 3/4" holes a couple of inches apart toward the cut ends. Top front and back of axle. You should now have a total of at least 6 holes on each axle half.
This is where it gets tricky.
I use a 10 foot piece of 6" "C" channel flat on the floor "C" facing up. Bare wheels (no tires) bolted to the axle hubs. Place each half of the axle with the wheels on the "C" channel with the bead area of the wheel across the "C" touching both sides. Ratchet straps go around the wheel and the "C" channel on each side and tighten up. Support the free ends of the axle halves as needed so they measure out equally to the floor from all 4 sides when rotated. The "C" channel helps keep the wheels lined up parallell to each other to help ensure a true running axle.
Use an internal sleeve on the axle tube. The sleeve length should go into the axle tube about 6" on both sides and leave the 1" gap between the original axle tube halves. And cover you holes drilled into the original axle halves.
Double check your measurements!
Double check your measurements!
Double check your supported end measurements!
Tack weld through all of your holes.
Double check your measurements.
Tack weld each of the old loose ends.
Double check your measurements.
Finish weld alternating holes and sides.
Too late now to change anything!
Finish weld the loose ends and let it cool on the "C" channel.
Remove from the "C" channel and repack bearings and replace the seals. All done.
I've done several this way. Either shortening or stretching. Only had one warp on me becaused I rushed the welds and took it off the rack too soon.
Having said all of this ( I wish I had some pictures to show you) I think it would be simpler to buy the axle you need and sell the old one.

“Out of every one hundred men, ten shouldn't even be there, eighty are just targets, nine are the real fighters, and we are lucky to have them, for they make the battle. Ah, but the one, one is a warrior, and he will bring the others back.”