A doctor posted at a railway hospital here allegedly killed his wife and two sons before committing suicide, police said…