Is it okay? It's the best thing you can do for the baby right now. This is when breastfeeding comes into its own. You actually will be protecting your baby by breastfeeding. And breastfeeding is even better than pumped milk because when you express milk, it loses some of those precious immune factors (antibodies are only one group of immune factors in the milk) that will help protect the baby. Also, the baby is comforted by breastfeeding and you will be comforted by your baby breastfeeding.
Incidentally, with most viral infections, you've been infected for several days before you develop any symptoms and you are most infectious during this "incubation period." Chances are you have passed on the infection to the baby already. Help protect the baby by continuing to breastfeed.
If you are quite ill, take the baby into bed with you and keep breastfeeding.