Contains spoilers about LMoP. As a background, I've been playing it for a few weeks with newbie players, although I'm not a newbie DM, so that part of your question I won't be able to answer. About the broader question, I think it's unanswerable - it depends entirely on the adventure. Cos or HotDQ are probably impossible to one shot, for example.
First Option - Run only part of the adventure.
If you don't want to run the whole adventure, but only a part of it as a one shot, it should be fine. Some one shots let hooks for future adventures. One way to one shot LMoP, giving some sense of ending while letting some mystery is to put Gundren with Sildar in the first cave. You rescue them, deliver them safely in Phandalin and that's it. They thank you, give you the reward and everyone gets back to their lives. They are still secretive about what's happening. If the players decide to keep playing and insist on learning about Gundren and the Cave, he tells them about the map - but the map itself was lost when he was kidnapped, and he can't remember exactly where the cave is (or simply doesn't know - he didn't look carefully at the map yet - or something along these lines). The map then can be found where normally Gundren would be.
Thundertree and Cragmaw castle can also be run as one shots, if you would prefer your players starting at a higher level and defeating some harder challenges.
Personally, I don't like the idea of one shoting WEC because there are too many plot hooks before it and it would feel a lot awkward for me to run it without the background.
Second Option - Run the whole adventure, cutting off what you can.
If you are, instead, interested in running the whole story, from the hook at Neverwinter (or other hooks you might have used) to the end, in the Wave Echo Cave, I'll first ask (and answer) honestly: can you?
Probably not.
If you want to run the whole (main) adventure (I mean just the main plot), i.e., from the hook to the Wave Echo Cave, it will almost certainly take more than two sessions.
Essentially, each chapter from LMoP can be a one shot. The first chapter is supposed to be a one shot, while the others should take 1 or 2 average sessions. With new players, that usually ends up increasing some time, especially if they are undecisive or have to check the books constantly - there are other questions on how to solve these problems, though (usually "How to speed up a game" or similar)
If each chapter should take (at least) one session, it's unlikely you can rush four chapters.
Things you can cut off, though
I will write about things that either my players skipped and felt no regrets for it or things they (or I) wished were skipped, also things that are explicitly stated as optional from the book itself.
First Chapter
The Goblin Ambush is a good first fight - it presents battle concepts like hiding, advantage and usually teaches someone that they shouldn't be wandering alone and getting attacked by 4 goblins at once and almost dying.
The Cragmaw Hideout/Cave is a loaded dungeon crawling, though. We, as a group, found this too much for a first session, tbh. There was a decent amount of roleplaying with the goblin interrogation and talking with Sildar, but other than that, it's lot of fights, some of them skippable but some players or PCs won't skip it. Myself, playing again I would cut the whole room with Yemrik and Sildar and put Sildar where the Bugbear (Klarg) is. It decreases some time of "WHAT PATH SHOULD WE CHOOSE?" and makes it considerably faster.
Note that skipping this part of the dungeon is common for players that rush it and led to some questions here about it, e.g. My players didn't rescue Sildar, what now?
Important alteration: make the remaining encounters a little harder and give considerably more experience.
Second Chapter
If you are going to rush, the third chapter is, as a whole, optional and skippable. This means most NPCs giving side quests here are also skippable. Other than that, it depends on the players rushing the Redbrand Hideout. My players did it (the question pretty much explains how to rush it) and it was really, really fast. If you want to force this rush, it's essentially cutting rooms 1-6 out. Do I recommend doing it? Not really. If you want to make sure they will be able to quickly proceed even if they kill Glasstaff, you can add the location of the Wave Echo Cave in the letter that Black Spider sent to Iarno.
Again, make the whole dungeon a little harder and give considerably more experience. By the end of this dungeon, they should be fourth level, which probably needs steroids for it to be possible (as they probably entered here with around ~700-900 XP and they need 2700 to get to 4).
Third Chapter
Skip everything except for the random encounters on their way to Wave Echo Cave. Depending on how fast you went through the first two chapters, you might be able to run the Cragmaw Castle. Sildar might have found it (instead of asking you to find and get rid of the goblins, he found it and get rid of them). Again, this depends on how fast you ran through the first two chapters. Note that Gundren is here. If you don't run it, either move it back to the Redbrand Hideout or to the Wave Echo Cave, depending on if you want Iarno/the letter to give the location of the cave or Gundren himself.
For reference, the problem with skipping this is that it's the chapter that gives the most amount of XP before the 4th chapter, BY FAR. I've made a table with how much XP each side quest gives along the numbers for the two chapters. Note that the first two chapters give you a total of 4200 XP (1050/character in a 4 PCs party), while the 3rd chapter alone gives you 10600 XP. While only 10800 XP is needed for the party to reach 4th level, it still means you need to somehow compensate for 6600 XP.
Another possibility is to tone down the encounters in WEC for 3rd level, instead of 4th.
Fourth Chapter
Hopefully, you somehow got them to 4th level (or you weakened the encounters here so they are beatable by a 3rd level party with the same challenge as it would originally for a 4th level). Also hopefully, with all these rushs in the beginning, you will have time to complete the whole cave.
With these changes, you should still be able to run through the main plotline - Gundren and Sildar were kidnapped, you rescue Sildar first and then Gundren, discovering about an evil network of Goblins (only in the Cave though) and bandits (Redbrand hideout) and defeating the mastermind (Black Spider) behind them in the final battle stage (Wave Echo Cave).
Honestly I would still give two sessions to this rushed version - one for the ambush, cave and the hideout and another for the WEC. So, TL;DR: This version takes at least two sessions, and if you party doesn't rush it, probably more. This version also cuts essentially everything that is barely skippable, so I don't think you can reduce it further.