That is because VGG16 model doesn’t have model.fc instead it has model.classifier. Change your code to
optim.SGD(model_transfer.classifier.parameters(), lr=0.001)

Also, it is always better to first print the model and see the way they are named.
print(model_transfer)

The final error is because I think you are trying to freeze some part of the network and I guess you frozen everything(I am not sure though).  In optim.SGD change the code from
model_transfer.parameters() to filter(lambda p: p.requires_grad, model_transfer.parameters())

to avoid the error but check thoroughly through your network to see the parameters and frozen layers.