can i limit editing specific custom fields to certain roles?

Simply use a Custom Field with its name starting with an underscore, so it won’t show up in the CF meta box, eg, _field_name instead of field_name.

It will be hidden for all roles, but if you are manipulating its value only through code, then no problem.

If you need to manipulate the value on the edit screen, then you’ll need a Custom Meta Box and control its appearance according to the user role.

[ update: looks like this kind of field can only be entered dynamically, it dumps an error if you try in the admin interface ]