Rashi in the first mishna says that one must say shema after 3 stars come out. He asks why then do we say shema [together with maariv] while it is still daytime? He answers that we say shema early in order to daven after saying divrei torah but we are really yotzei our obligation to say shema when we say krias shema al hamittah.
Tosfos in his first appearance in Shas wastes NO TIME going after Rashi.1] When we say krias shema al hamitta we only say the first paragraph and not the whole thing. If krias shema al hamittah is the "real" shema, then we should say all three paragraphs. 2] What about the brachos that precede shema?? We don't say them before we sleep! 3] The gemara teaches that krias shema al hamittah is for the "mazikin" and therefore talmidei chachomim who are shielded from the mazikin don't have to say it. If Rashi is correct that we then fulfill our דאורייתא obligation, then even talmidei chachomim should be obligated?
So there!!:-)
Rav Kook [טוב ראיה] took out his arsenal and defended Rashi. [I know that I am biased because I love him so much but when I learn his halachic writings I am in awe of his sparkling brilliance]. It is very simple. Rashi holds that since one is allowed to daven maariv while it is still daytime [from plag hamincha an hour and a quarter before dark], they thereby established that זמן שכיבה דרבנן is before nighttime and one can therefore fulfill his דרבנן obligation even before night.
Now everything is glatt and smoooooth. Answer to question 1] The reason we only say the first paragraph al hamittah is because only the first paragraph is מדאורייתא. We say the whole thing before night to fulfill our דרבנן obligation of saying all three paragraphs. Answer to question 2] The brachos are only מדרבנן so there is no problem saying them early together with the krias shema דרבנן. Answer to question 3] Rebbe Shimon Bar Yochai holds that a talmid chochom doesn't have to say shema at all because he is pattur due to his complete immersion in Torah. Even though we don't pasken like him it could be [suggests Rav Kook] that everyone agrees that מדאורייתא a talmid chochom is pattur and we pasken that he only has to say shema מדרבנן. Since the entire obligation on a talmid chochom is דרבנן all he has to say is the shema together with maariv before nightfall and doesn't have to say the later shema מדאורייתא.
The truth is that Rav Kook is מפליא with numerous more chiddushim in this shtikel but I will leave it up to the scholar to learn it himself inside.
What is interesting to note is the following: Rabbeinu Tam in Tosfos rejects [his grandfather!!] Rashi and says that one may fulfill his חיוב דאורייתא by saying shema while it is still daytime. Rabbeinu Tam was ashkenazi. The Shulchan Aruch [a Sfardi] says that preferably one should wait until dark to daven maariv. However, the custom of the Sfardim today is to daven early. If you go to the kotel you will see the Sfardi minyanim for maariv starting well before the Ashkenazi minyanim. I have been puzzled about this for quite a while. What is this custom based upon?? In fact רוב פוסקים hold that one should wait until צאת הכוכבים. [There was actually a minhag in the middle ages to daven maariv before plag hamincha but fortunately it was eliminated].