Beacuse Formic acid (HCOOH) is not a true acid, it contains both aldehyde (-CHO) as well as carboxyl group (-COOH), and it behaves as a reducing agent.
Therefore, Formic acid reduces Tollen's reagent to metallic Silver. While in case of acetic acid there is no aldehydic group to reduce tollen's reagent.