If you're seeking permission to receive a banana, you would ask, "May I have a banana?" If, however, you're wondering whether your diet allows a banana, then you would use the word can.
"Can I have a banana?" tells the listener that you're concerned about your ability to handle or eat the fruit. Perhaps you suffer digestive issues, odd allergies, or bouts of depression associated with bananas. In any case, you may not have a banana if you cannot deal with the repercussions of having it in your possession!