What about if Prime could mass displace, would his spike still kill you?
Ok, I may have jumped ahead to answer this but I friggen love doing some mass displacement research.
The Very Very short answer is yes/no.
But the much bigger and detailed answer is:
Several things factor into mass displacement such as; the cybertronians og size, how much bigger or smaller they want to go, their spark and how much energy/fuel they have.
The mass still has to go somewhere when they change so whichever way you see it (converting to energy, pocket dimension or more intense rearranging of their frame) the smaller/bigger you go from your og size the more energy you have to use.
Which would be dangerous in times of war, especially in times when they don't have access normal fuel sources. (You could say it might be what did Earthspark Rumble in.)
Optimus Prime definitely could do it but whether it would be safe for him to do so is another matter, I could see it being like a once-every-month or so type situation if he didn't have enough fuel to spare.
Onto his spike, will it still kill you?
This is where the fun begins, time for some maths.
So you want to bang your fave robot but they're on an energy budget and need to know how much smaller they need to be to safely sink their spike into that nice human---
Anyway, so I did do a post on tfa longarm/shockwave (here) and figured out that Longarm was 33.33% smaller than his original frame. This means that a big bot like Shockwave with access to a steady supply of energon/fuel, could safely hold 66.67% of his frame size with the occasional break back to his og size.
Now tfa Optimus is only a little bigger than Shockwave so for the sake of ease I'll round up to 34%.
At this new size, it is now safe to take Bayverse and Tfp Optimus but the others are just too big. To make their spikes survivable Es Optimus has to be 40% smaller and Idw Optimus has to be 45% smaller.
Yes, they'd be survivable but it's more of a could he keep it up to get it up.