The larvae are moth flies (Psychoda sp.)
The black head, black pointed tail, clear body with grayish intestines visible and also their small size 2-3 mm can be seen on both pictures.
Where they can be found in nature:
In nature, moth fly larvae, Psychoda sp. (Diptera: Psychodidae) normally occur in aquatic habitats that experience intermittent submersion or flooding. The larvae develop in polluted, shallow water or highly moist organic solids where they feed on decaying organic material in mud, moss or water.
Where they can be found in households:
In homes, the adult flies, which resemble tiny moths, are most likely found on the walls of bathrooms, kitchens, basements and other locations where sewer drains and plumbing fixtures are located. The flies are poor fliers and usually are found close to the drain or area from which they came. Moth fly larvae are known to live in drain traps, garbage disposals, toilet tanks, sides of drain pipes and overflow pipes in homes, wet areas around leaky pipes, sewer lines, and septic tanks where they feed on stuff that might accumulate in such areas. The moth flies that live in Michigan do not bite and are not known to transmit disease of any sort.
What to do against them:
The best way to control moth flies is to eliminate or reduce the larval food sources by thoroughly cleaning drain lines and plumbing fixtures. Pouring boiling water down the drain where larvae are suspected to be may help to reduce their numbers. Adults can be controlled with the application of a household aerosol insecticide (like Raid) or a good flyswatter. Be sure to read and follow all instructions and safety precautions found on the label before.
There are various other methods which are far more precise, listing how to eliminate moth flies from drains.