The inverse problem in microlensing: from the optical depth to galaxy models parameters