The whole point of a P-trap or S-trap is to have some standing water so you don't get sewer gas coming into the building. There is no required maximum depth of the trap, but if it gets too tall, you may get waste standing and rotting in the trap. Since this is a bathroom sink, not kitchen, that shouldn't be an issue for you. The weight of water sitting in the bowl will push the water in the trap up the bit of pipe until it's in the horizontal run and running down hill on its own again. If the bowl was below that drain line then you'd need a pump or to relocate the drain.
You could shorten the line coming in from the wall (as suggested in another answer). You can also shorten the tail piece coming off the bottom of the sink.
Purchase your trap (if you haven't already) and fiddle around with it until you get everything to fit, adjusting pipe lengths as necessary. Just remember "I cut it 3 times and it's still to long" is far better than "I cut it once and now it's too short".