At least 53 people have been killed by flash floods caused by torrential rain in northwest Pakistan, say officials.