You'll need to manually build up the expression, so that LINQ-to-Entities can translate it into SQL for you. Since you say you can get the string name of the PK property, you can use an extension method like this:
public int GetMaxPK<T>(this IQueryable<T> query, string pkPropertyName)
{
// TODO: add argument checks
var parameter = Expression.Parameter(typeof(T));
var body = Expression.Property(parameter, pkPropertyName);
var lambda = Expression.Lambda<Func<T,int>>(body, parameter);
var result = query.Max (lambda);
return result;
}