we need examples of these uses in order to know that they are both correct. As you used I eat at the table it misslead us, We don't eat in the table!
"Ich bin im Laden." Haha, almost 'bin Laden'. Sometimes I love the multiple choice options.
Why can't it be "Ich bin im dem Restaurant"?
Because that translates as i am at the the restaurant (there is an extra "the" used).