TOKYO (AP) _ From the basic bar of soap to the latest formula conjured up in biotechnology laboratories, cosmetic companies are brandishing an array of products in the battle for the allegiance of Japanese women - who are outspent on cosmetics only by Americans.

Women are wooed by fiercely competitive domestic makers while foreign concerns are making inroads into the $5.4 billion market. Last year, imports accounted for slightly less than 20 percent of total sales.

''We are at a stage where we must overhaul our approach to the consumer,'' says Yoshikuni Sato of Shiseido Co., which dominates the market with more than a quarter of the annual sales and puts out 2,100 products.

Meanwhile, its biggest rival, Kanebo Ltd., promotes lipstick and eyeshadow made with biotechnology techniques through its ''Bio Cinderella'' campaign girl.

Max Factor, the foreign leader, is seeking to become a ''color leader'' with its ''freaky lips,'' a palette of seven lip shades ranging from blue to yellow that encourages creativity among young Japanese women who tend to lack confidence in choosing colors.

Also in the arena are foreign companies that sell their products mostly in high class department stores. Department stores account for only about 5 percent of cosmetics sales in Japan, but are enjoying annual sales increases of about 10 percent compared to the total industry's average growth of 2 percent to 3 percent, said Thomas Sands of the U.S. firm Elizabeth Arden.

Recent government moves to simplify market entry procedures for imports also are expected to increase competition.

In July, the government announced it would categorize cosmetics into 78 groups and compile a list of permitted ingredients. New products using these ingredients need only notify the Japanese government before marketing them here. The system replaces current requirements for a separate license application for any new product.

''Before, it took six to 10 months to get approval for even a change in shade. It was a red tape nightmare,'' said Edward Kavanaugh, president of the U.S. Cosmetic, Toiletry and Fragrance Association. Kavanaugh was in Tokyo recently to attend a conference on cosmetic regulations in Japan.

''We are now at a crossroads. The market is there and now we have a lot of work to do,'' said the head of the 245-member trade association.

The task is catering to an increasingly sophisticated consumer.

''A recent characteristic among the younger generation is that the same consumer may express different preferences depending on the occasion - being at times name brand oriented, at times adventurous, going for both expensive and inexpensive items,'' said Reiko Lyster, president of Elle International, which markets the French Orlane cosmetics in Japan.

Mrs. Lyster said increasing affluence allows Japanese consumers more freedom for self-exploration. In the past, Orlane's premium-priced products sold mostly to a middle-age clientele, but younger consumers are now buying its 190-dollar creams, she said.

Elizabeth Arden's Sands said more cosmetic sales at department stores were due to the high standards of the Japanese consumer.

''The Japanese female consumer is very sophisticated with an increasing disposable income,'' he said.

America's Clinique Laboratories, whose products sell at only 66 department stores around Japan, has led such store sales recently. While the company does not disclose its sales figures, the weekly Shukan Asahi magazine reported in November that it holds 25.8 percent of department store sales after only eight years of business here.

''Clinique has done well in marketing here,'' said Shiseido spokesman Sato. ''The medical atmosphere really caught on,'' he said in reference to the white uniforms Clinique employees sport at counters where they conduct skin analyses.

The market in general has grown at a slower single-digit pace since 1977 and should expand only about 3 percent this year, said Motoshi Fujii, a spokesman for the Japan Cosmetic Industry Association.

Shiseido is trying to cope with the tighter market by switching from its mass-oriented approach to ''stage-based'' marketing - manufacturing different items for people in different stages of their lives, Sato said.

Similarly, it plans to redesign its 25,000 chain stores from cosmetic speciality houses to supermarket-type convenience stores to suit selected audiences.

End Adv Weekend Editions March 8-9