Charles Bogdonoff, 40, always was a rock-and-roll dentist. When he filled cavities in his Washington office, his patients could listen to the Rolling Stones on earphones. Or they could choose other selections, such as "Big Brown Eyes" or "The Magic Kingdom," the first of which was written by Bogdonoff, the second by his wife, Patricia. And both of which featured the singing voice of Charles Bogdonoff, D.D.S.

Two years ago Bogdonoff took the kind of mid-life gamble about which most people only fantasize: he quit his lucrative Washington practice and built a recording studio in a wing of his modern McLean home. Last month he opened Loft, a 16-track studio that contains some $100,000 worth of recording equipment.

At the same time the Bogdonoffs released a record titled "Johnny Carson." Patricia wrote the lyrics, Charles sang the song along with Matt Holson, lead singer in a local group Bogdonoff produces. The chorus:

Johnny Carson, aren't you ashamed ?

You've taken my love life away .

His eyes are out of focus ,

He hums jingles all day .

Oh, Johnny Carson, you've really done me wrong .

The Bogdonoffs want it all. They would like to be producers for a hit group, write smash songs, sing chartbusters and record superstars. But unless some of the 200 disc jockeys to whom they mailed copies of "Johnny Carson" see fit to play the song, Charles may soon return to peering into patient's mouths.

"I'm depressed," he sighed a couple of weeks ago, the day he called the Virginia dental license board to inquire about practicing in the Old Dominion. Stardom isn't threatening and the money he saved to build his studio and some money he received from a trust fund is running out. He anticipates some income from producing radio commericals - Patricia says they charge less than comparable recording studios - but nothing short of a hit record will prevent his return to dentistry, a profession he enjoys but, well, he'd rather be a recording star.

"This is the big mid-life crisis," he says. "I think when you hit 40, people think life may be passing them by, and you want to bring into focus a lot of the dreams you want to fulfill."

In 1959 Bogdonoff sang in a local group called The Holidays. One record, "Big Brown Eyes," made the Washington hit parade, and both Columbia and Epic records expressed an interest in making The Holidays stars. Fortunately, Bogdonoff maintained his interest in dentistry.

Eight years ago Bogdonoff married Patricia, his second wife, who was working as a technical information specialist for a computer firm. In 1975 the couple wrote an upbeat ditty called "The Magic Kingdom" which Walt Disney promptly bought and published. If the company had chosen it as a theme song, the Bogdonoffs could have spent their days gambling in Monte Carlo on the royalties. As it turned out, the song was used only as a finale number in the opening of Space Mountain at Disney World.

The music business, of course, is like that: a lot of possibilities with only slender chances for the jackpot.

"You get so close, you feel like you're tasting it sometimes," says Charles, "but it's so hard to get the final inch to break into the business."

Says Patricia: "I saw a sign in an art store that said 'Persistence.' That's the key to everything, and Charley certainly is being persistent. We both feel that someday, somebody's going to hear something." CAPTION: Picture, no caption, By Bill Snead