Shortage of social workers 'is putting children at risk'