This is something I have been wondering about for some time. If you take the conversation Loki has with Laufey at face value, then yes, Loki did let the Jotuns into Asgard. But who's to say that Loki is telling the truth. If I'm recalling correctly, we don't actually see Loki bring the Jotuns into Asgard. Loki is known for lying, so is it possible that he is just using the situation to his advantage?
Later in the film he straight up admits to Heimdall that he used one of his "secret paths" to get the Frost Giants into Asgard.
HEIMDALL: Tell me, Loki, how did you get the Jotuns into Asgard?
LOKI: You think the Bifrost is the only way in and out of the Realm? There are secret paths between worlds to which even you with all your gifts are blind. But I have need of them no longer, now that I am King.
And we actually see one of these "secret pathways" in Thor: The Dark World