I actually learned a dumb-down version of this sentence from Wheelock. Nice to stumble upon the original in this way.
You have a typo, though: "pueri" should be "pueris".
"Ut", when used with a verb in the indicative, generally means "just as" or "just like when".
"Puerīs" is the dative, so they're the ones receiving the pastries.
"Crūstula" is what's being given, of course, so it's in the accusative.
The role of ōlim here is unclear to me; perhaps somebody else can explain it. In any case, it's not necessary to understand the idea of the sentence.
Therefore, "blandī doctōrēs" is nominative, and the subject of this phrase. So what we have so far is, "Just as charming teachers give pastries to boys..."
The second half is more difficult due to the word order. "Velint" is subjunctive, so it must go with "ut". "Prima" agrees in case with "elementa". Thus, "ut elementa prima discere velint" -- "so that they will want to learn the first elements" (i.e., "the basics").
So what we have here is, "just as charming teachers give pastries to boys, so that they will want to learn the basics."
This is not really a complete sentence. For it to make sense, it's necessary to make it fit with the previous one: "Quamquam rīdentem dīcere vērum quid vetat?" ("However, what prevents [me] from telling the truth, laughing?") So, all together: "However, what prevents [me] from telling the truth, laughing, just as charming teachers give pastries to boys so that they will want to learn the basics?"
One creative translator has translated this as, "But can't we laugh when we reveal a truth / like teachers bearing treats who bribe a youth / so that he'll gobble up his ABCs?"