Hardly any details of your optical drive. Make, Model, OEM/Retail, how long in use, whether its inability to read some
CD-RWs and DVD-RWs is of recent origin, whether it was able to read these specific RWs earlier etc.,
In the circumstances only a general prescription, encompassing all aspects can be given. Either one of these may apply in your case.
1. Clean the lense.
2. Try a different known to be good branded media. Some drives can be choosy.
3. Check to see whether any recent firmware update is available and if so update.
4. If none of this resolves the issue, the laser in your ODD may have become weak. So may be your drive needs to be replaced.