Interesting.
I'll disregard letters, shards etc and keep it simple for now.
The name of the butler was never confirmed in red. So if his name is not "Alfred", he can definitely be the culprit. (I'll still refer to him as Alfred for simplicity)
What happened (after the moment Franziska got locked in the study):
Larry entered the dining room, knocked out Edgeworth, took the dining room key and opened the door to study. Franziska got out and ran to right bathroom, where she locked herself up.
Larry threw a bottle into study room (which shattered) and locked the door right away. After that Payne and Alfred entered the study to discover that Franziska is gone. Larry at the same time carries unconsious Edgeworth to the library (or he moved him beforehand, before he opened the study).
If the locked room that needs to be solved refers to the study, from which Franziska disappeared, that's the solution. Larry would be considered an accomplice in that case, and nothing rules out that he was cooperating at some plan with Alfred at the time (and killer knew about Larry's plans according to the note)
While Payne goes to library and encounters Larry there, Alfred enters left hallway and sees Klavier leaving file room, knocks him out, barricades the room with pre-prepared barricade and returns to central hallway to see Larry go to the left hallway. Larry then proceeds to enter the left bathroom and locks himself there. Alfred sees Payne enter the central hallway as well.
Alfred knocks Payne out after he removes the barricade. He then speaks to Larry through the door and convinces him to open it, after which Larry is stabbed. Alfred takes dining room key from Larry's body and plants stuff from Payne to Larry (pills and the note). He also takes wine cellar key from Phoenix, who was asleep (probably due to pills mixed with grape juice beforehand), and replaces it with dining room key.
As hallway is empty, he goes without trouble to right bathroom, makes Franziska open the door and stabs her as well. He plants the wine cellar key onto Edgeworth (for some reason).
After that he transported Payne to the study, he must have done it after the corpses were discovered (according to red truth), but it doesn't seem to matter much when exactly that happened or who made the discovery (as there is not much testimony for what occured after Phonix/Edgeworth woke up or after Klavier got released).