Playing a woman with a romantic history of dating bad boys shouldn't be too big a stretch for Pamela Anderson. It may be more of a challenge for her to play someone who works in an upscale bookstore. But that's the character she'll be playing in her new sitcom, whose sale to Fox was reported in the trade papers on Monday. In fact, Fox was so eager to have the show, a sitcom to be produced by Steve Levitan (Fox's Oliver Beene and Greg the Bunny), that the network agreed to a six-episode commitment even though no script has been written yet. Fox's guarantee of airtime helped the network beat ABC (where Anderson launched her TV career, on Home Improvement) in a bidding war over the yet-unwritten show. ''We think that Pam Anderson is going to be a major television star for us, and we've had many positive experiences working with Steve at the network,'' Fox Entertainment president Gail Berman told Variety. ''We decided to go the distance for this.'' Uh, OK, but if Anderson's working at a classy bookstore, how will she get an opportunity to squeeze into a one-piece bathing suit?