A Nordica Canadair CRJ-900 on behalf of LOT Polish Airlines, registration ES-ACG performing flight LO-8119 from Tallinn (Estonia) to Stockholm (Sweden), was climbing out of Tallinn when the crew reported smoke in the lavatories, stopped the climb at about 5000 feet and decided to return to Tallinn. While positioning for the approach the crew reported the visible smoke had dissipated, only the smell remained. The aircraft landed safely back on runway 26 about 13 minutes after departure. The airline reported the aft lavatory smoke detector had activated. The smoke detector reacted to a different detergent than usual used for the engines during the previous night. The occurrence aircraft was able to depart again after about 100 minutes on the ground and reached Stockholm with a delay of 2 hours.