The D.C. police department, like most other big-city police forces, is a closed world of tradition and machismo, a place where those who do not fit the mold are quickly spotted and often ostracized.

Officers Bonnie Davenport and Bobby Almstead most decidedly do not fit the mold.

Davenport, a 13-year veteran, is the department's first and only transsexual officer. Her rookie partner, Almstead, is the department's first acknowledged male homosexual.

The two officers have fought through cold stares and harassment to win praise from their supervisors and even grudging acceptance from their peers for their work as a team specializing in family disputes.

Frank Weinsheimer, their supervising sergeant, says they are "more patient, more understanding, more thorough" than other officers in his squad. "They bring a special quality to the job," he says. "Bobby is Spanish speaking, and gay, and has the eagerness of a rookie. Bonnie is a veteran and has a double perspective."

The two officers voluntarily work a permanent midnight shift in the Fourth District, a mostly residential area in Upper Northwest and Northeast Washington. That shift, known for its aggressiveness, is made up of 34 officers who make more arrests than the much larger daytime crews.

The assigning of partners is a touchy matter. Weinsheimer says Almstead and Davenport were put together because they are an effective team. Lt. Kerry White says there is a different reason: "The [other] officers don't object to working on the street with them, but they will not work in the same car with them. It's personal, not professional."

Davenport and Almstead are regularly assigned to the "crime patrol" car, a coveted assignment because the officers are free to roam the entire area. The crime patrol car takes the time-consuming calls to handle family disputes, "disorderlies" and unknown trouble. Weinsheimer says the two officers were assigned to that beat because of their "eagerness to respond to calls and their willingness to spend the extra time to resolve the situation rather than just make an arrest."

Bonnie Davenport is the new name the officer took following her sex change operation nearly four years ago. She has requested that her former male name not be used to protect her children. Before her operation, Davenport had spent nine years on the force and had received commendations for work on the 1976 "Sting" operation, a well-known case in which police set up an undercover fencing operation and arrested numerous robbers and burglars.

Davenport, 39, says that from the time she was a child until she had the sex-change operation at age 34, she was tormented by a pounding in her head like the beating of a drum, feelings she eventually attributed to her desire to become a woman. Her confusion, feelings of guilt and pain ended only with the operation, she said. Her unpublished autobiography is titled "The Badge and the Drum."

After what she describes as a painful year of operations, psychological adjustment to becoming a woman, and trying to care for her family while on a forced leave without pay, Davenport returned to the same district to work with the same officers.

"Police work gets into your blood. I came back because I had to decide if I would be better off returning to some of the old parts of my life. When I came back, I felt as though I had never left," she says.

Davenport is a confident, bright, carefully groomed woman who wears her shoulder-length blond hair in gentle curls. She wears dresses, worries about her makeup, fusses over her three teen-aged children and has a steady boyfriend.

Almstead, 30, is comfortable with his homosexuality. On the job he looks like a model officer with his pressed uniform, short haircut and polished shoes. He says he told the police recruiters and his classmates at the police academy that he was gay.

"In class one day we were talking about . . . human rights and someone said something about gays. He said he couldn't work with a homosexual. So I stood up and said, 'Look, I guess you all haven't heard this. This is the time to air this. I am gay. Let's talk about it.' " And talk they did. Almstead said the class was extended three hours so that everyone could discuss their feelings about gays.

Davenport and Almstead have formed a close friendship based on their respect for each other as well as on the sometimes subtle, sometimes overt discrimination each feels.

Davenport says she was harassed, taunted and snickered at when she returned to work in 1979. She says she still hears some nasty remarks, but that those things bother her less now.

Almstead says, "Hostility comes from fear. I am a bigger threat to other officers than they are to me." He adds that to deflect harassment, "All I have to do is put my arm around the other officer) and say how are you doing, and he is shattered."

Most officers approached declined to talk publicly about Davenport or Almstead. A few spoke privately, indicating that they would not work with either officer, to whom they referred with terms like "faggots." City law forbids the police department from discriminating on the basis of sexual orientation.

A few other officers did speak for the record. Officer Robert Kelly, on the force for 11 years, says of Davenport, "When something that different comes along, people will talk. Especially the police. But now she blends in just like one of the troops."

Another 11-year veteran, Shirley Brown, says she knows some officers haven't accepted her as a black female officer, and so she is sympathetic to Davenport and Almstead, whom she thinks are both good at their jobs.

"Some people still mumble and talk," Brown said. "If people aren't going to accept blacks and females, they will never accept gays and transsexuals."

On the job, Davenport is very much the senior officer who continually advises Almstead on things like the best route to a call, how to handle an unusual situation, the importance of remaining calm. Away from the squad car, Almstead was pleased when Davenport accepted his invitation to visit his favorite gay bar. Davenport, in turn, has shown Almstead her ranch home and her horses.

Almstead, a sculptor in his off hours, seems to welcome the attention he gets. He says his gay friends are impressed that he is a police officer, and that they call him "Officer Bob" since an article about him appeared in the Blade (a newspaper for homosexuals) last summer.

Davenport shuns publicity and turns down most interview requests, including, she says, a recent one from Playboy. She says that when she first returned to work she did talk to one reporter and photographer who said the story would appear only in Europe. Then she found that a tabloid distributed locally had picked up the story and picture.

"Everyone out here [in the community] was running around with it in their back pocket, comparing me to the picture. It caused me a lot of problems," she said.

Last Monday night, the officers got a call for their specialty--what police call a "domestic," an argument between family members or lovers. These situations are considered dangerous because the people involved in the dispute can suddenly turn on the police.

Inside the third-floor apartment just north of Howard University, the officers found a hulking man dressed in pajama bottoms. He was a Cuban refugee who, according to police, regularly forgets to take the medicine that keeps his explosive temper in check. His girlfriend was a tiny, nervous woman eager to show off her scars from their last fight.

The officers split up, Almstead talking to the man, and Davenport to the woman. Quickly, they defused the situation. The man, whom police had removed from the apartment two weeks before, got dressed and left to spend the night with a friend.

Almstead, who grew up in the Canal Zone and is fluent in Spanish, explained that in talking to the man, he "tried to turn the blame on the girlfriend. It makes him feel like a martyr. I say that she is sick and has this nervous condition. She doesn't, of course. But he likes that. . . . He feels like he is doing the right thing. He feels big. For him it works."

Sometimes the officers are recognized on the job, as happened last Thursday morning.

"I know you," a man they encountered on a call said, peering into Davenport's face. "I know you. You're the one who used to ride the scooter. You are the one who had the sex-change operation."

Davenport didn't move a muscle, then finally smiled. "Yes, that's me."

"You're looking good, girl! What is your name?" He peered at her name tag. "Miss Bonnie. Yeah, Miss Bonnie. You're okay. You're a celebrity. I know you. But you don't know me. You never caught me doing anything."

Last month, Almstead says, he responded to a dispute between two men.

"We made an arrest. The guy looks at me and said, 'Weren't you the guy in the Blade?' I said 'Yes,' and he said, 'Well, you can't arrest me. I'm gay.' "

"I told him to tell it to the judge."