Yes, the use of a UV or polarizing filter is fine. Digital camera profiles are specific to the entire imaging system...that is, the camera, lens, and filter (if any). Please keep in mind that if a profile is created with a UV filter attached, the profile is valid for only those conditions: camera+lens+UV filter. If the UV filter is removed and a polarizing filter is installed, a new profile will be required for optimal results.
Special effect filters such as warming and cooling filters are designed to alter the white balance of the camera thru the use of the filter. It is not recommended to profile while using filters designed to alter color as the resulting profile will attempt to correct for the filter's effect. These filters are intended to be used on a well-behaved imaging system to provide the desired result.