There's a point where Margaery places the cup on the table just across from Olenna. It is not unlikely that Olenna could have slipped it in while pretending to do something else.Nope. Just watched it again. Tyrian does look at Olenna Tyrell after grabbing the cup a final time before the poisoning. I don't know how Olenna Tyrell could have done it without getting caught. Margaery Tyrell could have done it though.
I've said it a lot but I'll say it again, I just cannot find motivation for Margaery to murder Joffrey considering what we've seen of her character in the past. More than anything she wants to be a Queen - so much so that she married Renly, a man who was quite clearly way more into her bother Loras than her. This is the second time she's married a King and had him die on her before the marriage was properly consummated. I don't think that's what she wants. While she clearly thinks Joffrey is a bit of a prat, she has him around her finger most of the time, she's even been doing stuff to make his image better like the announcement they would give all the leftovers to the poor people in the city after the wedding feast.