Yes, you can if you are in a pinch or it is winter time and fresh corn isn't available.  If you plan on using frozen corn, take the time to thaw it out, then pat it dry with a paper towel to remove some of the extra moisture.  You will also have to increase the cooking time, because frozen corn has more moisture than fresh corn.