Is it possible to complete all loyalty missions and save Kelly?

Solution 1:

Yes, it's possible. You need to finish all loyalty missions (except for Legion's) before going to the derelict Reaper. After getting back from the derelict Reaper, you are allowed time for exactly one mission before the Collectors invade Normandy (which should be Legion's loyalty mission). Once they've been removed from the ship, you must go directly to the Omega Relay if you want to save all of your crew.

Solution 2:

It's entirely possible to save absolutely everyone without completing every single loyalty mission - see also this question.

Solution 3:

After you get the IFF and legion you will be able to do 2, maybe 3 missions before the collectors attacked, to get everyone to survive, you must complete everyone's loyalty mission (except legion's which you can complete after), and use the Omega 4 relay just after the collector attack to have a chance at getting everyone out alive.